Submission #2869961
Source Code Expand
N = int(input()) a = [list(map(int,input().split())) for i in range(N)] a.insert(0,[0,0,0]) for i in range(N): if abs((a[i+1][1]+a[i+1][2])-(a[i][1]+a[i][2]))<=a[i+1][0]-a[i][0] and ((a[i+1][0]-a[i][0])%2==0 and abs((a[i+1][1]+a[i+1][2])-(a[i][1]+a[i][2]))%2==0) or ((a[i+1][0]-a[i][0])%2!=0 and abs((a[i+1][1]+a[i+1][2])-(a[i][1]+a[i][2]))%2!=0): pass else: print('No') exit() print('Yes')
Submission Info
Submission Time | |
---|---|
Task | C - Traveling |
User | toberustacean |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 432 Byte |
Status | WA |
Exec Time | 490 ms |
Memory | 27300 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 18 ms | 3064 KB |
0_001.txt | AC | 17 ms | 3064 KB |
0_002.txt | AC | 17 ms | 3064 KB |
1_003.txt | AC | 17 ms | 3064 KB |
1_004.txt | AC | 490 ms | 27300 KB |
1_005.txt | WA | 467 ms | 25756 KB |
1_006.txt | AC | 480 ms | 24140 KB |
1_007.txt | AC | 84 ms | 6092 KB |
1_008.txt | AC | 18 ms | 3064 KB |
1_009.txt | AC | 80 ms | 7356 KB |
1_010.txt | AC | 18 ms | 3064 KB |
1_011.txt | AC | 57 ms | 5716 KB |
1_012.txt | AC | 18 ms | 3064 KB |