結果
問題 | No.1205 Eye Drops |
ユーザー |
|
提出日時 | 2020-08-30 15:33:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 17 ms / 2,000 ms |
コード長 | 498 bytes |
コンパイル時間 | 665 ms |
コンパイル使用メモリ | 73,448 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 20:56:17 |
合計ジャッジ時間 | 2,009 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <map> using namespace std; typedef long long ll; #define rep(i,n) for (int i=0;i < (int)(n);i++) int main(){ int n,m; cin >> n >> m; int pos = 0; int time = 0; rep(i,m){ int t,p; cin >> t >> p; if (abs(pos-p) > t-time){ cout << "No" << endl; return 0; } time = t; pos = p; } cout << "Yes" << endl; return 0; }