結果

問題 No.1205 Eye Drops
ユーザー #leucobird
提出日時 2021-03-10 13:53:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 1,593 ms
コンパイル使用メモリ 169,252 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-12 04:25:59
合計ジャッジ時間 3,572 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;

int main(void)
{
  int n, m;
  cin >> n >> m;
  vector<int> t(m);
  vector<ll> p(m);
  ll cur = 0;
  bool pos = true;
  rep(i, m)
  {
    cin >> t[i] >> p[i];
    if (abs(cur - p[i]) > t[i])
    {
      pos = false;
    }
    else
    {
      cur = p[i];
    }
  }
  if (pos)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
0