結果

問題 No.2056 非力なレッド
ユーザー lloyzlloyz
提出日時 2022-08-26 22:52:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 415 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 32,664 KB
最終ジャッジ日時 2024-04-22 00:56:10
合計ジャッジ時間 8,109 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 27 ms
10,624 KB
testcase_04 AC 25 ms
10,752 KB
testcase_05 AC 25 ms
10,624 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 26 ms
10,624 KB
testcase_08 AC 26 ms
10,624 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 26 ms
10,624 KB
testcase_11 AC 26 ms
10,752 KB
testcase_12 AC 25 ms
10,752 KB
testcase_13 AC 206 ms
25,036 KB
testcase_14 AC 217 ms
24,400 KB
testcase_15 AC 188 ms
24,536 KB
testcase_16 AC 41 ms
11,904 KB
testcase_17 AC 148 ms
20,372 KB
testcase_18 AC 34 ms
11,136 KB
testcase_19 AC 51 ms
12,416 KB
testcase_20 AC 230 ms
27,584 KB
testcase_21 AC 71 ms
13,900 KB
testcase_22 AC 260 ms
24,508 KB
testcase_23 AC 252 ms
22,456 KB
testcase_24 AC 97 ms
16,924 KB
testcase_25 AC 237 ms
28,032 KB
testcase_26 AC 266 ms
29,280 KB
testcase_27 AC 256 ms
28,328 KB
testcase_28 AC 279 ms
32,528 KB
testcase_29 AC 297 ms
32,532 KB
testcase_30 AC 323 ms
32,408 KB
testcase_31 AC 298 ms
32,528 KB
testcase_32 AC 281 ms
32,532 KB
testcase_33 AC 325 ms
32,532 KB
testcase_34 AC 335 ms
32,528 KB
testcase_35 AC 287 ms
32,660 KB
testcase_36 AC 291 ms
32,664 KB
testcase_37 AC 415 ms
32,660 KB
testcase_38 AC 27 ms
10,752 KB
testcase_39 AC 27 ms
10,752 KB
testcase_40 AC 26 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x, m = map(int, input().split())
A = list(map(int, input().split()))

C = [0 for _ in range(n)]
for i in range(n):
    a = A[i]
    cnt = 0
    while a >= x:
        cnt += 1
        a //= 2
    C[i] = cnt
res = 0
for i in range(n - 1, -1, -1):
    C[i] = max(0, C[i] - res)
    m -= C[i] * (i + 1)
    res += C[i]
if m >= 0:
    print("Yes")
else:
    print("No")
0