markdown AtCoder常规大赛090

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown AtCoder常规大赛090相关的知识,希望对你有一定的参考价值。

#include <iostream>
#include <vector>
#include <stdio.h>

using namespace std;

int main(int argc, char const *argv[]){
    int N;
    cin >> N;
    int t[N], x[N], y[N];
    for (int i = 0; i < N; i++) {
      cin >> t[i] >> x[i] >> y[i];
    }

    int now_x, now_y, now = 0;
    for (int i = 0; i < N; i++){
      int dt = t[i] - now;
      int dx = abs(x[i] - now_x);
      int dy = abs(y[i] - now_y);
      int tmp = dt - dx - dy;
      if(tmp >=0 && tmp%2 == 0){
        now = t[i];
        now_x = x[i];
        now_y = y[i];
      }else{
        cout << "No" << "\n";
        return 0;
      }
    }
    cout << "Yes" << "\n";
    return 0;
}
## C - Traveling
https://arc089.contest.atcoder.jp/tasks/arc089_a

以上是关于markdown AtCoder常规大赛090的主要内容,如果未能解决你的问题,请参考以下文章

markdown AtCoder常规大赛085.md

[AtCoder arc090E]Avoiding Collision

[AtCoder arc090F]Number of Digits

markdown AtCoder初学者比赛089

markdown AtCoder Grand Contest 016

markdown 常规REST API HTTP状态代码