結果

問題 No.1570 Blocks
ユーザー KudeKude
提出日時 2021-06-27 13:06:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 334 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 93,308 KB
最終ジャッジ日時 2023-09-07 17:31:07
合計ジャッジ時間 13,424 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,296 KB
testcase_01 AC 70 ms
71,308 KB
testcase_02 AC 246 ms
86,596 KB
testcase_03 AC 287 ms
90,496 KB
testcase_04 AC 231 ms
85,160 KB
testcase_05 AC 236 ms
86,616 KB
testcase_06 AC 245 ms
86,656 KB
testcase_07 AC 118 ms
77,728 KB
testcase_08 AC 288 ms
88,344 KB
testcase_09 AC 321 ms
91,620 KB
testcase_10 AC 268 ms
88,680 KB
testcase_11 AC 284 ms
90,440 KB
testcase_12 AC 325 ms
93,304 KB
testcase_13 AC 316 ms
92,156 KB
testcase_14 AC 324 ms
92,492 KB
testcase_15 AC 196 ms
83,140 KB
testcase_16 AC 322 ms
92,728 KB
testcase_17 AC 194 ms
83,480 KB
testcase_18 AC 280 ms
88,604 KB
testcase_19 AC 193 ms
83,556 KB
testcase_20 AC 193 ms
83,228 KB
testcase_21 AC 261 ms
88,388 KB
testcase_22 AC 74 ms
71,200 KB
testcase_23 AC 74 ms
71,428 KB
testcase_24 AC 73 ms
71,104 KB
testcase_25 AC 74 ms
71,312 KB
testcase_26 AC 75 ms
71,104 KB
testcase_27 AC 74 ms
71,100 KB
testcase_28 AC 75 ms
71,320 KB
testcase_29 AC 72 ms
71,488 KB
testcase_30 AC 73 ms
71,608 KB
testcase_31 AC 74 ms
71,324 KB
testcase_32 AC 309 ms
93,308 KB
testcase_33 AC 323 ms
93,064 KB
testcase_34 AC 307 ms
90,200 KB
testcase_35 AC 324 ms
92,872 KB
testcase_36 AC 311 ms
92,464 KB
testcase_37 AC 319 ms
91,888 KB
testcase_38 AC 312 ms
93,276 KB
testcase_39 AC 325 ms
92,676 KB
testcase_40 AC 305 ms
92,688 KB
testcase_41 AC 320 ms
92,884 KB
testcase_42 AC 331 ms
92,504 KB
testcase_43 AC 326 ms
92,428 KB
testcase_44 AC 330 ms
92,488 KB
testcase_45 AC 334 ms
92,172 KB
testcase_46 AC 324 ms
92,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ab = sorted((tuple(map(int, input().split())) for _ in range(n)), key=lambda p: sum(p))
ok = True
now = 0
for a, b in ab:
    if now > b:
        ok = False
        break
    now += a
print('Yes' if ok else 'No')
0