結果

問題 No.1570 Blocks
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-06-27 13:24:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 32,404 KB
最終ジャッジ日時 2023-09-07 17:35:51
合計ジャッジ時間 12,488 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,864 KB
testcase_01 AC 16 ms
8,072 KB
testcase_02 AC 222 ms
24,284 KB
testcase_03 WA -
testcase_04 AC 194 ms
22,244 KB
testcase_05 AC 206 ms
23,144 KB
testcase_06 WA -
testcase_07 AC 42 ms
10,220 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 256 ms
26,560 KB
testcase_11 AC 284 ms
28,428 KB
testcase_12 WA -
testcase_13 AC 340 ms
31,240 KB
testcase_14 AC 358 ms
31,772 KB
testcase_15 AC 152 ms
18,700 KB
testcase_16 AC 339 ms
31,740 KB
testcase_17 WA -
testcase_18 AC 270 ms
27,208 KB
testcase_19 WA -
testcase_20 AC 147 ms
18,504 KB
testcase_21 WA -
testcase_22 AC 16 ms
8,068 KB
testcase_23 AC 16 ms
7,820 KB
testcase_24 AC 16 ms
8,160 KB
testcase_25 AC 16 ms
8,212 KB
testcase_26 AC 15 ms
8,104 KB
testcase_27 AC 16 ms
7,960 KB
testcase_28 AC 16 ms
8,256 KB
testcase_29 AC 15 ms
8,068 KB
testcase_30 AC 16 ms
7,808 KB
testcase_31 AC 15 ms
8,228 KB
testcase_32 AC 347 ms
31,260 KB
testcase_33 WA -
testcase_34 AC 318 ms
30,136 KB
testcase_35 WA -
testcase_36 AC 336 ms
30,932 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 341 ms
32,144 KB
testcase_40 AC 321 ms
30,916 KB
testcase_41 WA -
testcase_42 AC 340 ms
32,404 KB
testcase_43 AC 337 ms
32,400 KB
testcase_44 AC 344 ms
32,368 KB
testcase_45 AC 362 ms
32,404 KB
testcase_46 AC 353 ms
32,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ab = [list(map(int, input().split())) for i in range(n)]
ab.sort(key=lambda x: (x[0] / x[1]))
s = 0
for i in range(n):
    if s > ab[i][1]:
        exit(print("No"))
    else:
        s += ab[i][0]
print("Yes")
0