結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
seven_three
|
| 提出日時 | 2020-08-30 13:09:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 626 bytes |
| コンパイル時間 | 723 ms |
| コンパイル使用メモリ | 91,448 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-23 20:40:16 |
| 合計ジャッジ時間 | 1,955 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 24 |
ソースコード
#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;
t -= now;
long long l = now1 - t;
long long r = now1 + t;
if (l > p || r < p) {
cout << "No" << endl;
return 0;
}
now = t;
now1 = now1;
}
cout << "Yes" << endl;
return 0;
}
seven_three