結果
| 問題 | No.1205 Eye Drops | 
| コンテスト | |
| ユーザー |  keisuke6 | 
| 提出日時 | 2022-08-07 23:34:59 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 55 ms / 2,000 ms | 
| コード長 | 313 bytes | 
| コンパイル時間 | 2,787 ms | 
| コンパイル使用メモリ | 242,668 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-17 15:24:22 | 
| 合計ジャッジ時間 | 4,216 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge6 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 37 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int n=0,t=0;
  int N,M;
  cin>>N>>M;
  for(int i=0;i<M;i++){
      int T,P;
      cin>>T>>P;
      if(abs(P-n) > T-t){
          cout<<"No"<<endl;
          return 0;
      }
      t = T;
      n = P;
  }
  cout<<"Yes"<<endl;
}
            
            
            
        