結果

問題 No.1570 Blocks
ユーザー 👑 KazunKazun
提出日時 2021-06-27 22:43:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 374 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 88,184 KB
最終ジャッジ日時 2023-09-07 18:09:27
合計ジャッジ時間 15,355 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,276 KB
testcase_01 AC 72 ms
71,540 KB
testcase_02 AC 287 ms
83,892 KB
testcase_03 AC 341 ms
86,548 KB
testcase_04 AC 259 ms
84,080 KB
testcase_05 AC 268 ms
83,944 KB
testcase_06 AC 276 ms
83,972 KB
testcase_07 AC 115 ms
77,528 KB
testcase_08 AC 329 ms
85,612 KB
testcase_09 AC 380 ms
87,452 KB
testcase_10 AC 315 ms
85,612 KB
testcase_11 AC 342 ms
86,464 KB
testcase_12 AC 396 ms
87,688 KB
testcase_13 AC 387 ms
87,300 KB
testcase_14 AC 391 ms
87,708 KB
testcase_15 AC 217 ms
81,788 KB
testcase_16 AC 394 ms
87,384 KB
testcase_17 AC 209 ms
81,504 KB
testcase_18 AC 342 ms
85,968 KB
testcase_19 AC 209 ms
81,508 KB
testcase_20 AC 214 ms
81,972 KB
testcase_21 AC 311 ms
84,728 KB
testcase_22 AC 72 ms
71,376 KB
testcase_23 AC 73 ms
71,072 KB
testcase_24 AC 72 ms
71,204 KB
testcase_25 AC 74 ms
71,332 KB
testcase_26 AC 72 ms
71,488 KB
testcase_27 AC 73 ms
71,232 KB
testcase_28 AC 74 ms
71,528 KB
testcase_29 AC 74 ms
71,344 KB
testcase_30 AC 73 ms
71,468 KB
testcase_31 AC 73 ms
71,464 KB
testcase_32 AC 386 ms
87,564 KB
testcase_33 AC 397 ms
87,420 KB
testcase_34 AC 376 ms
86,772 KB
testcase_35 AC 391 ms
87,444 KB
testcase_36 AC 386 ms
86,956 KB
testcase_37 AC 384 ms
87,332 KB
testcase_38 WA -
testcase_39 AC 394 ms
87,588 KB
testcase_40 AC 378 ms
87,040 KB
testcase_41 AC 392 ms
87,184 KB
testcase_42 AC 417 ms
87,856 KB
testcase_43 AC 396 ms
88,184 KB
testcase_44 AC 414 ms
87,528 KB
testcase_45 AC 404 ms
87,832 KB
testcase_46 AC 409 ms
87,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
Block=[]

for _ in range(N):
    a,b=map(int,input().split())
    Block.append((a,b))

Block.sort(key=lambda t:t[::-1])

X=0
for a,b in Block:
    if X>b:
        exit(print("No"))
    X+=a

print("Yes")
0