Submission #3600506
Source Code Expand
N,K = map(int,input().split()) x = list(map(int,input().split())) result = [] for i in range(N-K+1): s,g = i,i+K-1 result.append(2*abs(x[s]) + abs(x[g])) result.append(abs(x[s]) + 2*abs(x[g])) result.sort() print(result[0])
Submission Info
Submission Time | |
---|---|
Task | C - Candles |
User | tbistr |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 245 Byte |
Status | WA |
Exec Time | 99 ms |
Memory | 14380 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 17 ms | 2940 KB |
0_01.txt | WA | 17 ms | 3064 KB |
0_02.txt | AC | 17 ms | 3060 KB |
0_03.txt | AC | 17 ms | 2940 KB |
1_00.txt | AC | 43 ms | 13984 KB |
1_01.txt | AC | 99 ms | 13988 KB |
1_02.txt | WA | 43 ms | 14224 KB |
1_03.txt | WA | 96 ms | 14224 KB |
1_04.txt | WA | 42 ms | 14380 KB |
1_05.txt | WA | 93 ms | 14000 KB |
1_06.txt | AC | 82 ms | 13944 KB |
1_07.txt | AC | 81 ms | 13976 KB |