結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
f843nmfwisfeuw
|
| 提出日時 | 2020-09-19 17:11:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 2,000 ms |
| コード長 | 702 bytes |
| コンパイル時間 | 793 ms |
| コンパイル使用メモリ | 91,632 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 18:04:38 |
| 合計ジャッジ時間 | 2,037 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
#include <bitset>
#include <cassert>
using namespace std;
int main() {
long N, M;
cin >> N >> M;
long p0 = 0;
long t0 = 0;
bool ok = true;
for (long i = 0; i < M; ++i) {
long T, P;
cin >> T >> P;
if (abs(P - p0) > (T - t0)) {
ok = false;
break;
}
t0 = T;
p0 = P;
}
if (ok) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
f843nmfwisfeuw