結果
問題 | No.1205 Eye Drops |
ユーザー |
![]() |
提出日時 | 2020-08-30 13:02:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 60 ms / 2,000 ms |
コード長 | 515 bytes |
コンパイル時間 | 1,457 ms |
コンパイル使用メモリ | 165,408 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 20:29:48 |
合計ジャッジ時間 | 2,696 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define int long longtypedef pair<int,int> P;int INF = 1e18;int mod = 1e9+7;int dx[4] = {1, 0, -1, 0};int dy[4] = {0, 1, 0, -1};signed main() {int N,M;cin >> N >> M;int old = 0,now = 0;for(int i = 0; i < M; i++) {int T,P;cin >> T >> P;if(abs(P-old) <= T-now) {old = P;now = T;}else {cout << "No" << endl;return 0;}}cout << "Yes" << endl;}