Submission #5075916
Source Code Expand
N = int(input()) A = [0] * (N + 2) for i, v in enumerate(input().split()): A[i+1] = int(v) num = sum([abs(A[i] - A[i+1]) for i in range(N+1)]) for i in range(N): ret = num + abs(A[i-1] - A[i+1]) - (abs(A[i-1] - A[i]) + abs(A[i] - A[i+1])) print(ret)
Submission Info
Submission Time | |
---|---|
Task | C - Traveling Plan |
User | ishigen |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 268 Byte |
Status | WA |
Exec Time | 239 ms |
Memory | 14000 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | WA | 229 ms | 13228 KB |
02.txt | WA | 239 ms | 14000 KB |
03.txt | WA | 17 ms | 2940 KB |
04.txt | WA | 225 ms | 13228 KB |
05.txt | WA | 226 ms | 13228 KB |
06.txt | WA | 238 ms | 13228 KB |
07.txt | WA | 218 ms | 13232 KB |
08.txt | WA | 237 ms | 13232 KB |
09.txt | WA | 223 ms | 11768 KB |
10.txt | WA | 215 ms | 11880 KB |
11.txt | WA | 218 ms | 11768 KB |
12.txt | WA | 213 ms | 11888 KB |
sample-01.txt | WA | 17 ms | 3064 KB |
sample-02.txt | WA | 17 ms | 3060 KB |
sample-03.txt | WA | 17 ms | 3064 KB |