結果
| 問題 | No.1205 Eye Drops |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-30 13:03:31 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 135 ms / 2,000 ms |
| コード長 | 430 bytes |
| 記録 | |
| コンパイル時間 | 434 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 90,496 KB |
| 最終ジャッジ日時 | 2026-05-17 13:07:28 |
| 合計ジャッジ時間 | 7,102 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
ソースコード
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
# inputna
n,m = list(map(int, input().split()))
tp = [list(map(int, input().split())) for _ in range(m)]
tp.sort()
c = 0
ct = 0
for t,p in tp:
if abs(c-p)>t-ct:
ans = False
break
c = p
ct = t
else:
ans = True
if ans:
print("Yes")
else:
print("No")