結果

問題 No.1205 Eye Drops
ユーザー T.Stream
提出日時 2021-03-15 21:35:04
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 413 bytes
コンパイル時間 1,947 ms
コンパイル使用メモリ 200,524 KB
最終ジャッジ日時 2025-01-19 17:24:39
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
	long long n,m,i;
	cin >> n >> m;
	vector<pair<long long,long long>> t(m+1);
	t[0]={0,0};
	for(i=1; i<=m; i++){
		cin >> t[i].first >> t[i].second;
	}
	sort(t.begin(),t.end());
	for(i=1; i<=m; i++){
		if((t[i].first-t[i-1].first)<(abs(t[i].second-t[i-1].second))){
			cout << "No" << endl; return 0;
		}
	}
	cout << "Yes" << endl; return 0;
	return 0;
}
0