Submission #2869671
Source Code Expand
N = int(input()) B = [[0]*3]*N for i in range(N): B[i] = list(map(int,input().split())) ans = 'Yes' B.insert(0,[0,0,0]) for i in range(N): T = B[i+1][0] - B[i][0] S = abs(B[i+1][1] - B[i][1]) + abs(B[i+1][2] - B[i][2]) if T >= S and (T - S)%2 == 0: pass else: ans = 'No' break print(ans)
Submission Info
Submission Time | |
---|---|
Task | C - Traveling |
User | kamojiro |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 346 Byte |
Status | AC |
Exec Time | 452 ms |
Memory | 27300 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 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 | 17 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 | 452 ms | 27300 KB |
1_005.txt | AC | 374 ms | 25756 KB |
1_006.txt | AC | 443 ms | 24140 KB |
1_007.txt | AC | 79 ms | 6220 KB |
1_008.txt | AC | 18 ms | 3064 KB |
1_009.txt | AC | 87 ms | 7356 KB |
1_010.txt | AC | 18 ms | 3064 KB |
1_011.txt | AC | 58 ms | 5836 KB |
1_012.txt | AC | 18 ms | 3064 KB |