結果
問題 | No.1205 Eye Drops |
ユーザー |
![]() |
提出日時 | 2020-08-30 13:35:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 21 ms / 2,000 ms |
コード長 | 792 bytes |
コンパイル時間 | 1,699 ms |
コンパイル使用メモリ | 165,260 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 20:48:32 |
合計ジャッジ時間 | 2,950 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#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; int prevtime=0; rep(i,m){ int t,p; cin>>t>>p; if(abs(prev-p) > abs(t-prevtime)){ cout<<"No"<<endl; return 0; }else{ prev=p; prevtime=t; } } cout<<"Yes"<<endl; return 0; }