結果

問題 No.1205 Eye Drops
コンテスト
ユーザー now4est
提出日時 2020-08-30 15:40:18
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 320 ms / 2,000 ms
+ 65µs
コード長 293 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 53 ms
コンパイル使用メモリ 14,720 KB
実行使用メモリ 31,104 KB
最終ジャッジ日時 2026-10-15 05:47:36
合計ジャッジ時間 5,053 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, M = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(M)]

S = 0
ans = 0
for i in range(M):
    T,P = A[i]
    if i != 0:
        T = T - A[i-1][0]
    if S-T <= P <= S+T:
        S = P
        ans += 1
    else:
        break

print('Yes' if M == ans else 'No')
0