結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-01 20:46:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 764 bytes |
| コンパイル時間 | 1,670 ms |
| コンパイル使用メモリ | 167,808 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-23 21:02:17 |
| 合計ジャッジ時間 | 2,942 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 36 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
template <typename T> bool chmax(T &u, const T z) { if (u < z) {u = z; return true;} else return false; }
template <typename T> bool chmin(T &u, const T z) { if (u > z) {u = z; return true;} else return false; }
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
typedef pair<ll, ll> P;
const ll INF=1LL<<60;
int main(){
int n,m;
cin>>n>>m;
vector<int>t(n),p(n);
rep(i,m)cin>>t[i]>>p[i];
rep(i,m){
if(t[i]<p[i]){
cout<<"No"<<endl;
return 0;
}
}
int jikan=0;
int kusuri=0;
for(int i=1;i<m;i++){
jikan=t[i]-t[i-1];
kusuri=abs(p[i]-p[i-1]);
if(jikan<kusuri){
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
return 0;
}