結果

問題 No.1205 Eye Drops
ユーザー miya145592
提出日時 2023-04-30 23:28:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 454 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 86,516 KB
最終ジャッジ日時 2024-11-19 13:09:49
合計ジャッジ時間 4,842 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
TP = [list(map(int, input().split())) for _ in range(M)]
bt = 0
bp = 0
for t, p in TP:
    dist = abs(p-bp)
    if dist>t-bt:
        print("No")
        exit()
    bt = t
    bp = p
print("Yes")
0