結果
問題 | No.1205 Eye Drops |
ユーザー |
|
提出日時 | 2024-04-02 15:00:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 730 bytes |
コンパイル時間 | 1,839 ms |
コンパイル使用メモリ | 174,492 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-09-30 23:14:00 |
合計ジャッジ時間 | 4,466 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 WA * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using vll=vector<long long>; template<typename T> T get(){T r;cin>>r;return r;} int main() { ll n,m; bool f=true; cin>>n>>m; vector<pair<ll,ll>> tp(m); for(int i=0;i!=m;i++){ tp[i].first=get<ll>(); tp[i].second=get<ll>(); } sort(tp.begin(),tp.end()); if((tp[0].first==0&&tp[0].second!=0)||tp[0].second/tp[0].first>1){ f=false; } for(ll i=0;f&&i!=m-1;i++){ if((tp[i+1].second-tp[i].second)/(tp[i+1].first-tp[i].first)>1){ break; f=false; } } if(f){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } system("pause"); }