Submission #3816353
Source Code Expand
#include<iostream> using namespace std; int main(){ int N; cin >> N; int t[110000], x[110000], y[110000]; t[0] = x[0] = y[0] = 0; for(int i = 0; i < N; i++){ cin >> t[i+1] >> x[i+1] >> y [i+i]; } bool can = true; for(int i = 0; i < N; i++){ int dist = abs(x[i]-x[i+1]) + abs(y[i]-y[i+1]); int dt = t[i+1] - t[i]; if(dt < dist) can = false; if(dist % 2 != dt % 2) can = false; } if(can) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | PracticeA - Welcome to AtCoder |
User | shimiyu_zuya |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 517 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 00_rnd_01.txt, 00_rnd_02.txt, 00_rnd_03.txt, 00_rnd_04.txt, 00_rnd_05.txt, 00_sample_1.txt, 00_sample_2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_rnd_01.txt | WA | 1 ms | 256 KB |
00_rnd_02.txt | WA | 1 ms | 256 KB |
00_rnd_03.txt | WA | 1 ms | 256 KB |
00_rnd_04.txt | WA | 1 ms | 256 KB |
00_rnd_05.txt | WA | 1 ms | 256 KB |
00_sample_1.txt | WA | 1 ms | 256 KB |
00_sample_2.txt | WA | 1 ms | 256 KB |