結果

問題 No.1570 Blocks
ユーザー rlangevinrlangevin
提出日時 2023-05-03 12:54:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 271 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 87,324 KB
実行使用メモリ 82,960 KB
最終ジャッジ日時 2023-08-13 23:38:17
合計ジャッジ時間 11,096 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
71,508 KB
testcase_01 AC 55 ms
71,516 KB
testcase_02 AC 193 ms
81,808 KB
testcase_03 AC 231 ms
82,496 KB
testcase_04 AC 173 ms
81,360 KB
testcase_05 AC 183 ms
81,268 KB
testcase_06 AC 185 ms
81,044 KB
testcase_07 AC 77 ms
77,228 KB
testcase_08 AC 226 ms
82,664 KB
testcase_09 AC 254 ms
82,944 KB
testcase_10 AC 211 ms
81,972 KB
testcase_11 AC 228 ms
82,032 KB
testcase_12 AC 263 ms
82,740 KB
testcase_13 AC 255 ms
82,720 KB
testcase_14 AC 263 ms
82,660 KB
testcase_15 AC 142 ms
79,768 KB
testcase_16 AC 262 ms
82,664 KB
testcase_17 AC 144 ms
79,580 KB
testcase_18 AC 219 ms
81,816 KB
testcase_19 AC 142 ms
79,508 KB
testcase_20 AC 146 ms
79,740 KB
testcase_21 AC 204 ms
81,868 KB
testcase_22 AC 56 ms
71,248 KB
testcase_23 AC 58 ms
71,136 KB
testcase_24 AC 57 ms
71,092 KB
testcase_25 AC 55 ms
71,432 KB
testcase_26 AC 56 ms
71,092 KB
testcase_27 AC 57 ms
71,252 KB
testcase_28 AC 55 ms
71,364 KB
testcase_29 AC 58 ms
71,136 KB
testcase_30 AC 57 ms
71,604 KB
testcase_31 AC 56 ms
71,496 KB
testcase_32 AC 262 ms
82,668 KB
testcase_33 AC 263 ms
82,796 KB
testcase_34 AC 243 ms
82,120 KB
testcase_35 AC 264 ms
82,516 KB
testcase_36 AC 253 ms
82,728 KB
testcase_37 AC 249 ms
82,692 KB
testcase_38 AC 254 ms
82,664 KB
testcase_39 AC 262 ms
82,668 KB
testcase_40 AC 253 ms
82,960 KB
testcase_41 AC 263 ms
82,880 KB
testcase_42 AC 271 ms
82,924 KB
testcase_43 AC 266 ms
82,876 KB
testcase_44 AC 264 ms
82,924 KB
testcase_45 AC 268 ms
82,868 KB
testcase_46 AC 270 ms
82,536 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