Submission #2555758
Source Code Expand
# -*- coding: utf-8 -*- time = [] x = [] y = [] diff_time = [] diff_x = [] diff_y = [] time.append(0) x.append(0) y.append(0) number = int(input()) for i in range(number): inputs = list(map(int, input().split())) time.append(inputs[0]) x.append(inputs[1]) y.append(inputs[2]) for i in range(number): diff_time.append(time[i + 1] - time[i]) diff_x.append(x[i + 1] - x[i]) diff_y.append(y[i + 1] - y[i]) flag = 1 for i in range(number): is_able_to_go = diff_time[i] - (diff_x[i] + diff_y[i]) if not (is_able_to_go >= 0 and is_able_to_go % 2 == 0): flag = 0 if flag: print("Yes") else: print("No")
Submission Info
Submission Time | |
---|---|
Task | ABC086C - Traveling |
User | cl0wn |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 692 Byte |
Status | AC |
Exec Time | 464 ms |
Memory | 15792 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 | 444 ms | 14156 KB |
1_005.txt | AC | 464 ms | 15792 KB |
1_006.txt | AC | 454 ms | 10988 KB |
1_007.txt | AC | 82 ms | 4672 KB |
1_008.txt | AC | 18 ms | 3064 KB |
1_009.txt | AC | 108 ms | 5088 KB |
1_010.txt | AC | 18 ms | 3064 KB |
1_011.txt | AC | 74 ms | 4432 KB |
1_012.txt | AC | 18 ms | 3064 KB |