Submission #3225815
Source Code Expand
N = int(input()) t = [] x = [] y = [] for i in range(N): n = list(map(int, input().split())) t.append(n[0]) x.append(n[1]) y.append(n[2]) n.clear() answer = "YES" for i in range(N-1): if t%2 != (abs(x[i+1]-x[i])+abs(y[i+1]-y[i]))%2: answer = "NO" if t[i+1]-t[i] < abs(x[i+1]-x[i])+abs(y[i+1]-y[i]): answer = "NO" print(answer)
Submission Info
Submission Time | |
---|---|
Task | C - Traveling |
User | kojidooon |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 421 Byte |
Status | RE |
Exec Time | 367 ms |
Memory | 11824 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 | RE | 17 ms | 3064 KB |
0_001.txt | WA | 17 ms | 3064 KB |
0_002.txt | RE | 17 ms | 3064 KB |
1_003.txt | WA | 17 ms | 3064 KB |
1_004.txt | RE | 367 ms | 11824 KB |
1_005.txt | RE | 360 ms | 10236 KB |
1_006.txt | RE | 354 ms | 8684 KB |
1_007.txt | RE | 68 ms | 3948 KB |
1_008.txt | RE | 18 ms | 3064 KB |
1_009.txt | RE | 90 ms | 4324 KB |
1_010.txt | RE | 18 ms | 3064 KB |
1_011.txt | RE | 62 ms | 3820 KB |
1_012.txt | RE | 17 ms | 3064 KB |