結果
問題 | No.1205 Eye Drops |
ユーザー |
![]() |
提出日時 | 2022-07-23 16:09:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 69 ms / 2,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 753 ms |
コンパイル使用メモリ | 63,488 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 05:20:18 |
合計ジャッジ時間 | 2,921 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#include <iostream> using namespace std; int main() { int n,m; cin>>n>>m; int t,p; int t0=0,p0=0; bool f=1; for (int i=0;i<m;i++){ cin>>t>>p; if(t==0 and p!=0) f=0; t0+=abs(p-p0); if(t<t0) f=0; t0=t; p0=p; } if(f) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }