Submission #2387167
Source Code Expand
import copy n = int(input()) line = input().split(' ') a = [int(element) for element in line] tempMin = copy.deepcopy(a) tempMax = copy.deepcopy(a) minV = min(a) tempMin.remove(minV) minV2nd = min(tempMin) maxV = max(a) tempMax.remove(maxV) maxV2nd = max(tempMax) for i in range(n): high = maxV low = minV if a[i] == minV: low = minV2nd if a[i] == maxV: high = maxV2nd print(i, low, high) if low < 0 and 0 < high: print (2 * abs(high - low)) else: print (2 * max(abs(low), abs(high)))
Submission Info
Submission Time | |
---|---|
Task | C - Traveling Plan |
User | cha9ro |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 577 Byte |
Status | WA |
Exec Time | 515 ms |
Memory | 18528 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 | 515 ms | 18528 KB |
02.txt | WA | 466 ms | 18400 KB |
03.txt | WA | 22 ms | 3444 KB |
04.txt | WA | 448 ms | 17888 KB |
05.txt | WA | 461 ms | 18400 KB |
06.txt | WA | 477 ms | 17888 KB |
07.txt | WA | 458 ms | 18400 KB |
08.txt | WA | 473 ms | 18456 KB |
09.txt | WA | 451 ms | 15880 KB |
10.txt | WA | 463 ms | 16352 KB |
11.txt | WA | 463 ms | 15884 KB |
12.txt | WA | 453 ms | 15944 KB |
sample-01.txt | WA | 22 ms | 3444 KB |
sample-02.txt | WA | 22 ms | 3444 KB |
sample-03.txt | WA | 22 ms | 3444 KB |