結果

問題 No.1570 Blocks
ユーザー brthyyjpbrthyyjp
提出日時 2021-10-14 10:31:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 86,700 KB
最終ジャッジ日時 2023-10-17 19:20:13
合計ジャッジ時間 14,153 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,352 KB
testcase_01 AC 37 ms
53,352 KB
testcase_02 AC 282 ms
83,224 KB
testcase_03 AC 344 ms
84,716 KB
testcase_04 AC 241 ms
82,084 KB
testcase_05 AC 256 ms
82,320 KB
testcase_06 AC 259 ms
82,440 KB
testcase_07 AC 88 ms
76,552 KB
testcase_08 AC 323 ms
83,796 KB
testcase_09 AC 382 ms
86,052 KB
testcase_10 AC 296 ms
83,212 KB
testcase_11 AC 329 ms
84,716 KB
testcase_12 AC 389 ms
86,304 KB
testcase_13 AC 385 ms
86,184 KB
testcase_14 AC 393 ms
85,988 KB
testcase_15 AC 193 ms
80,048 KB
testcase_16 AC 395 ms
86,272 KB
testcase_17 AC 198 ms
80,920 KB
testcase_18 AC 318 ms
83,636 KB
testcase_19 AC 188 ms
80,380 KB
testcase_20 AC 186 ms
79,984 KB
testcase_21 AC 299 ms
83,436 KB
testcase_22 AC 38 ms
53,384 KB
testcase_23 AC 39 ms
53,384 KB
testcase_24 AC 38 ms
53,384 KB
testcase_25 AC 38 ms
53,384 KB
testcase_26 AC 38 ms
53,384 KB
testcase_27 AC 39 ms
53,384 KB
testcase_28 AC 39 ms
53,384 KB
testcase_29 AC 38 ms
53,384 KB
testcase_30 AC 37 ms
53,384 KB
testcase_31 AC 38 ms
53,384 KB
testcase_32 AC 391 ms
86,208 KB
testcase_33 AC 404 ms
86,388 KB
testcase_34 AC 373 ms
85,400 KB
testcase_35 AC 394 ms
86,284 KB
testcase_36 AC 385 ms
86,060 KB
testcase_37 AC 385 ms
85,912 KB
testcase_38 WA -
testcase_39 AC 406 ms
86,700 KB
testcase_40 AC 383 ms
86,024 KB
testcase_41 AC 395 ms
86,328 KB
testcase_42 AC 404 ms
85,888 KB
testcase_43 AC 408 ms
85,888 KB
testcase_44 AC 410 ms
85,980 KB
testcase_45 AC 403 ms
85,876 KB
testcase_46 AC 406 ms
86,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
total = 0
AB = []
for i in range(n):
    a, b = map(int, input().split())
    AB.append((a, b))
    total += a
AB.sort(key=lambda x:(-x[1], -x[0]))
for a, b in AB:
    if b < total-a:
        print('No')
        exit()
    total -= a
print('Yes')
0