結果

問題 No.1570 Blocks
ユーザー brthyyjpbrthyyjp
提出日時 2021-10-14 10:40:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 238 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 492 ms
コンパイル使用メモリ 81,720 KB
実行使用メモリ 85,580 KB
最終ジャッジ日時 2023-10-17 19:20:42
合計ジャッジ時間 9,211 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,436 KB
testcase_01 AC 36 ms
53,436 KB
testcase_02 AC 161 ms
79,592 KB
testcase_03 AC 191 ms
80,660 KB
testcase_04 AC 149 ms
79,024 KB
testcase_05 AC 153 ms
79,020 KB
testcase_06 AC 158 ms
79,104 KB
testcase_07 AC 73 ms
74,052 KB
testcase_08 AC 187 ms
80,664 KB
testcase_09 AC 206 ms
81,080 KB
testcase_10 AC 176 ms
80,664 KB
testcase_11 AC 188 ms
80,664 KB
testcase_12 AC 214 ms
81,100 KB
testcase_13 AC 210 ms
80,784 KB
testcase_14 AC 228 ms
85,580 KB
testcase_15 AC 127 ms
79,024 KB
testcase_16 AC 211 ms
80,976 KB
testcase_17 AC 131 ms
80,824 KB
testcase_18 AC 181 ms
80,664 KB
testcase_19 AC 131 ms
80,656 KB
testcase_20 AC 127 ms
79,024 KB
testcase_21 AC 178 ms
80,616 KB
testcase_22 AC 37 ms
53,436 KB
testcase_23 AC 37 ms
53,436 KB
testcase_24 AC 38 ms
53,436 KB
testcase_25 AC 37 ms
53,436 KB
testcase_26 AC 38 ms
53,436 KB
testcase_27 AC 38 ms
53,436 KB
testcase_28 AC 38 ms
53,436 KB
testcase_29 AC 37 ms
53,436 KB
testcase_30 AC 37 ms
53,436 KB
testcase_31 AC 38 ms
53,436 KB
testcase_32 AC 208 ms
81,076 KB
testcase_33 AC 214 ms
81,100 KB
testcase_34 AC 203 ms
80,664 KB
testcase_35 AC 222 ms
80,908 KB
testcase_36 AC 207 ms
80,772 KB
testcase_37 AC 208 ms
81,072 KB
testcase_38 AC 215 ms
81,068 KB
testcase_39 AC 215 ms
80,976 KB
testcase_40 AC 210 ms
80,956 KB
testcase_41 AC 216 ms
80,912 KB
testcase_42 AC 234 ms
83,976 KB
testcase_43 AC 238 ms
83,964 KB
testcase_44 AC 235 ms
83,960 KB
testcase_45 AC 238 ms
83,972 KB
testcase_46 AC 215 ms
80,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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