結果

問題 No.1570 Blocks
ユーザー 👑 rin204rin204
提出日時 2022-03-21 21:19:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 303 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 81,976 KB
実行使用メモリ 90,980 KB
最終ジャッジ日時 2024-04-17 17:57:51
合計ジャッジ時間 12,918 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
51,840 KB
testcase_01 AC 44 ms
51,712 KB
testcase_02 AC 207 ms
82,560 KB
testcase_03 AC 249 ms
84,736 KB
testcase_04 AC 196 ms
83,840 KB
testcase_05 AC 197 ms
82,608 KB
testcase_06 AC 209 ms
82,752 KB
testcase_07 AC 104 ms
76,544 KB
testcase_08 AC 244 ms
85,060 KB
testcase_09 AC 290 ms
86,656 KB
testcase_10 AC 235 ms
86,272 KB
testcase_11 AC 244 ms
84,480 KB
testcase_12 AC 293 ms
87,296 KB
testcase_13 AC 276 ms
86,612 KB
testcase_14 AC 284 ms
87,084 KB
testcase_15 AC 166 ms
80,384 KB
testcase_16 AC 284 ms
86,784 KB
testcase_17 AC 167 ms
82,480 KB
testcase_18 AC 240 ms
84,480 KB
testcase_19 AC 169 ms
82,176 KB
testcase_20 AC 164 ms
80,384 KB
testcase_21 AC 229 ms
83,328 KB
testcase_22 AC 46 ms
52,096 KB
testcase_23 AC 46 ms
51,968 KB
testcase_24 AC 45 ms
51,968 KB
testcase_25 AC 45 ms
51,712 KB
testcase_26 AC 49 ms
51,840 KB
testcase_27 AC 47 ms
51,840 KB
testcase_28 AC 46 ms
51,840 KB
testcase_29 AC 48 ms
51,840 KB
testcase_30 AC 49 ms
51,968 KB
testcase_31 AC 47 ms
51,840 KB
testcase_32 AC 289 ms
88,704 KB
testcase_33 AC 292 ms
86,912 KB
testcase_34 AC 265 ms
84,764 KB
testcase_35 AC 303 ms
87,424 KB
testcase_36 AC 300 ms
86,900 KB
testcase_37 AC 283 ms
85,376 KB
testcase_38 AC 302 ms
90,980 KB
testcase_39 AC 282 ms
87,168 KB
testcase_40 AC 289 ms
87,040 KB
testcase_41 AC 303 ms
86,912 KB
testcase_42 AC 293 ms
86,904 KB
testcase_43 AC 293 ms
86,700 KB
testcase_44 AC 287 ms
86,764 KB
testcase_45 AC 287 ms
86,912 KB
testcase_46 AC 286 ms
87,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
ab.sort(key = lambda x:x[0] + x[1])

tot = 0
for a, b in ab:
    if tot > b:
        print("No")
        exit()
    tot += a
print("Yes")
0