結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
poohbear
|
| 提出日時 | 2020-08-30 13:08:54 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 869 bytes |
| コンパイル時間 | 2,237 ms |
| コンパイル使用メモリ | 195,588 KB |
| 最終ジャッジ日時 | 2025-01-13 20:54:40 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 36 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define rep(a,n) for (int a = 0; a < (n); ++a)
using namespace std;
using ll = long long;
typedef pair<ll,ll> P;
typedef pair<P,ll> PP;
typedef vector<vector<ll> > Graph;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e18;
int main(){
ll n,m;
cin >> n >> m;
vector<P>que;
que.push_back({0,0});
rep(i,m){
ll t,p;
cin >> t >> p;
que.push_back({t,p});
}
bool ans = true;
rep(i,m){
ll t_diff =que[i+1].first-que[i].first;
ll p_diff = que[i+1].second-que[i].second;
if(t_diff<p_diff)ans=false;
}
if(ans){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
return 0;
}
poohbear