結果
問題 | No.1205 Eye Drops |
ユーザー |
![]() |
提出日時 | 2020-08-30 13:33:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 729 bytes |
コンパイル時間 | 1,757 ms |
コンパイル使用メモリ | 164,972 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 20:47:52 |
合計ジャッジ時間 | 3,113 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 23 |
ソースコード
#include<bits/stdc++.h>using namespace std;#define MOD 1000000007//#define MOD 998244353#define INF 1000000010#define EPS 1e-9#define F first#define S second#define debug(x) cout<<x<<endl;#define repi(i,x,n) for(int i=x;i<n;i++)#define rep(i,n) repi(i,0,n)#define lp(i,n) repi(i,0,n)#define repn(i,n) for(int i=n;i>=0;i--)#define int long long#define endl "\n"typedef pair<int,int> PII;typedef pair<int,string> PIS;typedef pair<string,int> PSI;signed main(){cin.tie(0);ios::sync_with_stdio(false);int n,m;cin>>n>>m;int prev=0;rep(i,m){int t,p;cin>>t>>p;if(abs(prev-p) > t){cout<<"No"<<endl;return 0;}else prev=p;}cout<<"Yes"<<endl;return 0;}