結果

問題 No.1205 Eye Drops
ユーザー aqua_tenhou
提出日時 2020-08-30 13:24:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 75,904 KB
最終ジャッジ日時 2024-11-23 20:45:39
合計ジャッジ時間 3,027 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
sw = 1
x = 0
t0 = 0
for i in range(m):
    t,p = map(int,input().split())
    if abs(p-x) <= t - t0:
        x = p
        t0 = t
    else:
        sw = 0
        break
        
print(["No","Yes"][sw])
0