Submission #3604755
Source Code Expand
N = int(input()) txy = [[0,0,0]] for i in range(N): txy.append(list(map(int,input().split()))) for i in range(1,N+1): if abs(txy[i][1] - txy[i-1][1]) + abs(txy[i][2] - txy[i-1][2]) > abs(txy[i][0] - txy[i-1][0]): print("No") exit() elif txy[i][1] == txy[i-1][1] and txy[i][2] == txy[i-1][2]: if (txy[i][0] - txy[i-1][0]) % 2 != 0: print("No") exit() print("Yes")
Submission Info
Submission Time | |
---|---|
Task | C - Traveling |
User | alexara1123 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 438 Byte |
Status | WA |
Exec Time | 454 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 | 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 | 454 ms | 27300 KB |
1_005.txt | AC | 359 ms | 25756 KB |
1_006.txt | AC | 429 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 | WA | 73 ms | 5716 KB |
1_012.txt | WA | 18 ms | 3064 KB |