結果

問題 No.1205 Eye Drops
ユーザー e869120
提出日時 2021-02-26 08:21:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 67,736 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-10-01 22:32:50
合計ジャッジ時間 2,815 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;

long long N, M;
long long T[1 << 19], P[1 << 19];

int main() {
	cin >> N >> M;
	for (int i = 1; i <= M; i++) cin >> T[i] >> P[i];
	for (int i = 1; i <= M; i++) {
		long long dst = abs(P[i - 1] - P[i]);
		if (dst > T[i] - T[i - 1]) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}
0