結果

問題 No.1570 Blocks
ユーザー rlangevinrlangevin
提出日時 2023-05-03 12:49:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 299 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 510 ms
コンパイル使用メモリ 86,560 KB
実行使用メモリ 88,948 KB
最終ジャッジ日時 2023-08-13 23:36:39
合計ジャッジ時間 13,958 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
71,316 KB
testcase_01 AC 55 ms
71,308 KB
testcase_02 AC 209 ms
84,904 KB
testcase_03 AC 256 ms
86,468 KB
testcase_04 AC 183 ms
84,060 KB
testcase_05 AC 196 ms
84,588 KB
testcase_06 AC 208 ms
84,896 KB
testcase_07 AC 76 ms
76,544 KB
testcase_08 AC 244 ms
86,340 KB
testcase_09 AC 278 ms
88,056 KB
testcase_10 AC 228 ms
85,288 KB
testcase_11 AC 243 ms
86,612 KB
testcase_12 AC 288 ms
88,348 KB
testcase_13 AC 281 ms
88,096 KB
testcase_14 AC 289 ms
88,676 KB
testcase_15 AC 151 ms
82,092 KB
testcase_16 AC 283 ms
88,540 KB
testcase_17 AC 155 ms
81,956 KB
testcase_18 AC 245 ms
85,836 KB
testcase_19 AC 151 ms
81,868 KB
testcase_20 AC 151 ms
82,144 KB
testcase_21 AC 230 ms
85,532 KB
testcase_22 AC 61 ms
71,108 KB
testcase_23 AC 59 ms
71,132 KB
testcase_24 AC 59 ms
71,056 KB
testcase_25 AC 56 ms
71,064 KB
testcase_26 AC 57 ms
71,020 KB
testcase_27 AC 58 ms
71,248 KB
testcase_28 AC 58 ms
71,340 KB
testcase_29 AC 56 ms
71,332 KB
testcase_30 AC 56 ms
71,160 KB
testcase_31 AC 55 ms
70,980 KB
testcase_32 AC 284 ms
88,224 KB
testcase_33 AC 284 ms
88,424 KB
testcase_34 AC 263 ms
87,556 KB
testcase_35 AC 282 ms
88,096 KB
testcase_36 AC 274 ms
88,540 KB
testcase_37 AC 278 ms
88,056 KB
testcase_38 AC 295 ms
88,100 KB
testcase_39 AC 290 ms
88,604 KB
testcase_40 AC 275 ms
88,284 KB
testcase_41 AC 296 ms
88,320 KB
testcase_42 AC 296 ms
88,804 KB
testcase_43 AC 294 ms
88,720 KB
testcase_44 AC 291 ms
88,948 KB
testcase_45 AC 292 ms
88,652 KB
testcase_46 AC 299 ms
88,468 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