結果

問題 No.1205 Eye Drops
ユーザー 東前頭十一枚目
提出日時 2020-08-31 01:01:58
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 2,821 ms
コンパイル使用メモリ 190,912 KB
最終ジャッジ日時 2025-01-14 02:14:10
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	int64_t n, m; cin >> n >> m;
	int64_t pp = 0, pt = 0;
	while(m--) {
		int64_t t, p; cin >> t >> p;
		if(abs(pt - t) < abs(pp - p)) {
			cout << "No" << '\n';
			return 0;
		}
		pt = t, pp = p;
	}
	cout << "Yes" << '\n';
	return 0;
}
0