結果

問題 No.1205 Eye Drops
ユーザー m_tsubasam_tsubasa
提出日時 2020-08-30 13:03:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 3,148 ms
コンパイル使用メモリ 191,208 KB
最終ジャッジ日時 2025-01-13 20:49:16
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int n, m, now = 0, nt = 0;

int main() {
  bool ch = 1;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    int t, p;
    cin >> t >> p;
    if (abs(p - now) > t - nt) ch = 0;
    nt = t, now = p;
  }
  if (ch)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
0