結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
seven_three
|
| 提出日時 | 2020-08-30 13:48:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| コード長 | 644 bytes |
| コンパイル時間 | 715 ms |
| コンパイル使用メモリ | 91,240 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-23 20:49:52 |
| 合計ジャッジ時間 | 1,981 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
int main() {
long long n, m;
cin >> n >> m;
long long now = 0, now1 = 0;
for (int i = 0; i < m; i++) {
long long t, p;
cin >> t >> p;
long long t1 = t;
t -= now;
long long l = now1 - t;
long long r = now1 + t;
if (l > p || r < p) {
cout << "No" << endl;
return 0;
}
now = t1;
now1 = p;
}
cout << "Yes" << endl;
return 0;
}
seven_three