結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,384 KB
testcase_01 AC 37 ms
53,384 KB
testcase_02 AC 165 ms
79,496 KB
testcase_03 WA -
testcase_04 AC 152 ms
78,928 KB
testcase_05 AC 158 ms
78,932 KB
testcase_06 WA -
testcase_07 AC 75 ms
73,960 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 181 ms
80,568 KB
testcase_11 AC 194 ms
80,568 KB
testcase_12 WA -
testcase_13 AC 218 ms
80,688 KB
testcase_14 AC 232 ms
85,424 KB
testcase_15 AC 130 ms
78,928 KB
testcase_16 AC 221 ms
80,884 KB
testcase_17 WA -
testcase_18 AC 189 ms
80,568 KB
testcase_19 WA -
testcase_20 AC 134 ms
78,932 KB
testcase_21 WA -
testcase_22 AC 37 ms
53,384 KB
testcase_23 AC 38 ms
53,384 KB
testcase_24 AC 38 ms
53,384 KB
testcase_25 AC 37 ms
53,384 KB
testcase_26 AC 38 ms
53,384 KB
testcase_27 AC 38 ms
53,384 KB
testcase_28 AC 38 ms
53,384 KB
testcase_29 AC 37 ms
53,384 KB
testcase_30 AC 38 ms
53,384 KB
testcase_31 AC 38 ms
53,384 KB
testcase_32 AC 214 ms
81,000 KB
testcase_33 WA -
testcase_34 AC 204 ms
80,568 KB
testcase_35 WA -
testcase_36 AC 211 ms
80,680 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 218 ms
80,696 KB
testcase_40 AC 214 ms
80,684 KB
testcase_41 WA -
testcase_42 AC 244 ms
83,884 KB
testcase_43 AC 246 ms
83,880 KB
testcase_44 AC 241 ms
83,880 KB
testcase_45 AC 245 ms
83,816 KB
testcase_46 AC 224 ms
80,832 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[0])
cur = 0
for a, b in AB:
    if b < cur:
        print('No')
        exit()
    cur += a
print('Yes')
0