結果

問題 No.1570 Blocks
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-06-27 14:46:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 366 ms
コンパイル使用メモリ 10,508 KB
実行使用メモリ 32,324 KB
最終ジャッジ日時 2023-09-07 17:55:28
合計ジャッジ時間 13,504 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,032 KB
testcase_01 AC 15 ms
7,820 KB
testcase_02 AC 242 ms
24,216 KB
testcase_03 WA -
testcase_04 AC 208 ms
22,144 KB
testcase_05 AC 224 ms
23,256 KB
testcase_06 WA -
testcase_07 AC 43 ms
10,236 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 268 ms
26,364 KB
testcase_11 AC 298 ms
28,344 KB
testcase_12 WA -
testcase_13 AC 357 ms
31,580 KB
testcase_14 AC 376 ms
32,180 KB
testcase_15 AC 163 ms
18,672 KB
testcase_16 AC 369 ms
31,828 KB
testcase_17 WA -
testcase_18 AC 287 ms
27,252 KB
testcase_19 WA -
testcase_20 AC 153 ms
18,660 KB
testcase_21 WA -
testcase_22 AC 16 ms
7,924 KB
testcase_23 AC 16 ms
8,208 KB
testcase_24 AC 16 ms
7,912 KB
testcase_25 AC 16 ms
7,824 KB
testcase_26 AC 16 ms
7,928 KB
testcase_27 AC 15 ms
8,256 KB
testcase_28 AC 17 ms
7,844 KB
testcase_29 AC 16 ms
7,804 KB
testcase_30 AC 15 ms
8,040 KB
testcase_31 AC 16 ms
7,784 KB
testcase_32 AC 388 ms
31,140 KB
testcase_33 WA -
testcase_34 AC 342 ms
30,100 KB
testcase_35 WA -
testcase_36 AC 353 ms
30,800 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 371 ms
32,112 KB
testcase_40 AC 352 ms
30,800 KB
testcase_41 WA -
testcase_42 AC 389 ms
32,324 KB
testcase_43 AC 381 ms
32,212 KB
testcase_44 AC 386 ms
32,324 KB
testcase_45 AC 380 ms
32,320 KB
testcase_46 AC 415 ms
32,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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