Submission #5075674
Source Code Expand
N = int(input()) A = [int(i) for i in input().split()] for i in range(N): num = 0 pos = 0 for ai, av in enumerate(A): if ai == i: continue num += abs(pos - av) pos = av num += abs(pos - 0) print(num)
Submission Info
Submission Time | |
---|---|
Task | C - Traveling Plan |
User | ishigen |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 268 Byte |
Status | TLE |
Exec Time | 2104 ms |
Memory | 14048 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 | TLE | 2104 ms | 13788 KB |
02.txt | TLE | 2104 ms | 14040 KB |
03.txt | AC | 17 ms | 2940 KB |
04.txt | TLE | 2104 ms | 13792 KB |
05.txt | TLE | 2104 ms | 13792 KB |
06.txt | TLE | 2104 ms | 13792 KB |
07.txt | TLE | 2104 ms | 13792 KB |
08.txt | TLE | 2104 ms | 14048 KB |
09.txt | TLE | 2104 ms | 11784 KB |
10.txt | TLE | 2104 ms | 12284 KB |
11.txt | TLE | 2104 ms | 11796 KB |
12.txt | TLE | 2104 ms | 11916 KB |
sample-01.txt | AC | 17 ms | 3060 KB |
sample-02.txt | AC | 17 ms | 3060 KB |
sample-03.txt | AC | 17 ms | 2936 KB |