結果

問題 No.1570 Blocks
ユーザー ああいいああいい
提出日時 2021-12-23 19:25:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 1,022 ms
コンパイル使用メモリ 11,752 KB
実行使用メモリ 28,980 KB
最終ジャッジ日時 2023-10-17 20:45:54
合計ジャッジ時間 16,308 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,084 KB
testcase_01 AC 28 ms
10,084 KB
testcase_02 AC 301 ms
22,540 KB
testcase_03 AC 420 ms
24,388 KB
testcase_04 AC 273 ms
21,056 KB
testcase_05 AC 291 ms
21,688 KB
testcase_06 AC 315 ms
20,940 KB
testcase_07 AC 61 ms
11,676 KB
testcase_08 AC 407 ms
23,988 KB
testcase_09 AC 487 ms
26,312 KB
testcase_10 AC 353 ms
24,264 KB
testcase_11 AC 381 ms
25,720 KB
testcase_12 AC 486 ms
26,832 KB
testcase_13 AC 455 ms
28,176 KB
testcase_14 AC 461 ms
28,656 KB
testcase_15 AC 203 ms
18,356 KB
testcase_16 AC 460 ms
28,396 KB
testcase_17 AC 207 ms
17,184 KB
testcase_18 AC 365 ms
24,928 KB
testcase_19 AC 213 ms
17,232 KB
testcase_20 AC 202 ms
18,196 KB
testcase_21 AC 366 ms
22,484 KB
testcase_22 AC 30 ms
10,084 KB
testcase_23 AC 30 ms
10,088 KB
testcase_24 AC 29 ms
10,084 KB
testcase_25 AC 29 ms
10,084 KB
testcase_26 AC 29 ms
10,088 KB
testcase_27 AC 30 ms
10,088 KB
testcase_28 AC 29 ms
10,088 KB
testcase_29 AC 28 ms
10,084 KB
testcase_30 AC 29 ms
10,084 KB
testcase_31 AC 29 ms
10,084 KB
testcase_32 AC 488 ms
26,628 KB
testcase_33 AC 502 ms
27,004 KB
testcase_34 AC 424 ms
27,168 KB
testcase_35 AC 494 ms
26,732 KB
testcase_36 AC 434 ms
27,812 KB
testcase_37 AC 478 ms
25,948 KB
testcase_38 WA -
testcase_39 AC 464 ms
28,548 KB
testcase_40 AC 439 ms
27,824 KB
testcase_41 AC 497 ms
26,832 KB
testcase_42 AC 471 ms
28,980 KB
testcase_43 AC 474 ms
28,980 KB
testcase_44 AC 476 ms
28,980 KB
testcase_45 AC 463 ms
28,980 KB
testcase_46 AC 519 ms
27,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
l = []
for _ in range(N):
    a,b = map(int,input().split())
    l.append((b,a))
l.sort(reverse = True)
Sum = [0] * N
Sum[0] = l[-1][1]
for i in range(1,N):
    Sum[i] = Sum[i-1] + l[-1-i][1]
Sum.insert(0,0)
import sys
for i in range(N):
    b = l[i][0]
    if b < Sum[-2-i]:
        print('No')
        exit()
print('Yes')
        
0