結果

問題 No.1570 Blocks
ユーザー rlangevinrlangevin
提出日時 2023-05-03 12:54:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 280 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 82,100 KB
実行使用メモリ 81,828 KB
最終ジャッジ日時 2024-05-01 13:13:40
合計ジャッジ時間 10,621 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,100 KB
testcase_01 AC 34 ms
52,800 KB
testcase_02 AC 190 ms
80,328 KB
testcase_03 AC 230 ms
81,196 KB
testcase_04 AC 176 ms
79,956 KB
testcase_05 AC 173 ms
79,660 KB
testcase_06 AC 182 ms
79,616 KB
testcase_07 AC 63 ms
76,552 KB
testcase_08 AC 226 ms
81,404 KB
testcase_09 AC 258 ms
81,452 KB
testcase_10 AC 212 ms
81,236 KB
testcase_11 AC 234 ms
81,580 KB
testcase_12 AC 267 ms
81,380 KB
testcase_13 AC 272 ms
81,148 KB
testcase_14 AC 277 ms
81,220 KB
testcase_15 AC 139 ms
78,232 KB
testcase_16 AC 274 ms
81,564 KB
testcase_17 AC 130 ms
78,220 KB
testcase_18 AC 224 ms
81,564 KB
testcase_19 AC 137 ms
78,692 KB
testcase_20 AC 138 ms
78,200 KB
testcase_21 AC 201 ms
80,612 KB
testcase_22 AC 34 ms
52,188 KB
testcase_23 AC 34 ms
51,940 KB
testcase_24 AC 33 ms
52,892 KB
testcase_25 AC 33 ms
52,732 KB
testcase_26 AC 33 ms
53,020 KB
testcase_27 AC 33 ms
52,464 KB
testcase_28 AC 34 ms
52,552 KB
testcase_29 AC 35 ms
52,636 KB
testcase_30 AC 33 ms
52,004 KB
testcase_31 AC 35 ms
53,088 KB
testcase_32 AC 271 ms
81,376 KB
testcase_33 AC 263 ms
81,200 KB
testcase_34 AC 249 ms
81,132 KB
testcase_35 AC 261 ms
81,352 KB
testcase_36 AC 264 ms
81,160 KB
testcase_37 AC 252 ms
81,388 KB
testcase_38 AC 264 ms
81,620 KB
testcase_39 AC 274 ms
81,520 KB
testcase_40 AC 272 ms
81,420 KB
testcase_41 AC 276 ms
81,828 KB
testcase_42 AC 279 ms
81,476 KB
testcase_43 AC 268 ms
81,464 KB
testcase_44 AC 279 ms
81,092 KB
testcase_45 AC 280 ms
81,556 KB
testcase_46 AC 276 ms
81,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline

N = int(readline())
D = []
now = 0
for i in range(N):
    A, B = map(int, readline().split())
    D.append((A + B, A))
    now += A

D.sort()
while D:
    if D[-1][0] >= now:
        _, A = D.pop()
        now -= A
    else:
        break
    
print("No") if D else print("Yes")
0