結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
kkkk97368086
|
| 提出日時 | 2021-11-24 15:31:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 2,000 ms |
| コード長 | 514 bytes |
| コンパイル時間 | 2,212 ms |
| コンパイル使用メモリ | 198,840 KB |
| 実行使用メモリ | 9,728 KB |
| 最終ジャッジ日時 | 2024-06-27 00:53:30 |
| 合計ジャッジ時間 | 3,999 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
ソースコード
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M; cin >> N >> M;
map<long long, long long> mp;
for(int i = 0; i < N; i++){
long long T; cin >> T;
long long P; cin >> P;
mp[T] = P;
}
long long time = 0, pos = 0;
for(auto p: mp){
long long move = abs(p.second - pos);
long long time2 = p.first - time;
if(time2 < move){
cout << "No" << endl;
return 0;
}
time = p.first, pos = p.second;
}
cout << "Yes" << endl;
}
kkkk97368086