結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-27 11:51:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 370 bytes |
| コンパイル時間 | 2,086 ms |
| コンパイル使用メモリ | 191,312 KB |
| 最終ジャッジ日時 | 2025-01-16 06:01:40 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n, m;
cin >> n >> m;
ll pos = 0;
while (m--) {
ll t, p;
cin >> t >> p;
ll dist = abs(p - pos);
if (dist <= t) {
pos = p;
} else {
cout << "No" << '\n';
return 0;
}
}
cout << "Yes" << '\n';
}