結果

問題 No.1205 Eye Drops
ユーザー sakaki_tohru
提出日時 2020-08-30 13:02:27
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 827 ms
コンパイル使用メモリ 65,792 KB
最終ジャッジ日時 2025-01-13 20:48:18
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    int n,m;cin>>n>>m;
    int now=0;
    int time=0;

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

    return 0;
}
0