結果
問題 | No.1205 Eye Drops |
ユーザー |
![]() |
提出日時 | 2020-08-30 14:21:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 69 ms / 2,000 ms |
コード長 | 1,083 bytes |
コンパイル時間 | 1,571 ms |
コンパイル使用メモリ | 167,984 KB |
実行使用メモリ | 5,632 KB |
最終ジャッジ日時 | 2024-11-23 20:51:55 |
合計ジャッジ時間 | 3,418 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#include<bits/stdc++.h>using namespace std;#define int long long#define REP(i,m,n) for(int i=(m);i<(n);i++)#define rep(i,n) REP(i,0,n)#define pb push_back#define all(a) a.begin(),a.end()#define rall(c) (c).rbegin(),(c).rend()#define mp make_pair#define endl '\n'#define vec vector<ll>#define mat vector<vector<ll> >#define fi first#define se secondtypedef long long ll;typedef unsigned long long ull;typedef pair<ll,ll> pll;typedef long double ld;typedef complex<double> comp;const ll inf=1e9+7;const ll mod=1e9+7;const int MAX=300010;vector<long long> mindiv(MAX);void osa_k(){mindiv[1]=1;for(long long i=2;i<=MAX;i++){if(mindiv[i]>0)continue;long long k=1;while(k*i<MAX){if(mindiv[k*i]==0)mindiv[i*k]=i;k++;}}}signed main(){ll n,m;cin>>n>>m;bool f=1;ll now=0;ll la=0;rep(i,m){ll t,p;cin>>t>>p;if(abs(p-now)>t-la)f=0;la=t;now=p;}if(f){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}}