結果

問題 No.2056 非力なレッド
ユーザー shotoyooshotoyoo
提出日時 2022-08-26 22:42:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 848 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 113,612 KB
最終ジャッジ日時 2024-04-22 00:47:55
合計ジャッジ時間 4,227 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
54,180 KB
testcase_01 AC 39 ms
54,480 KB
testcase_02 AC 37 ms
54,656 KB
testcase_03 AC 35 ms
54,600 KB
testcase_04 AC 36 ms
56,072 KB
testcase_05 AC 34 ms
54,876 KB
testcase_06 AC 34 ms
54,892 KB
testcase_07 AC 35 ms
55,152 KB
testcase_08 AC 36 ms
55,068 KB
testcase_09 AC 35 ms
55,448 KB
testcase_10 AC 36 ms
55,072 KB
testcase_11 AC 36 ms
55,512 KB
testcase_12 AC 36 ms
54,584 KB
testcase_13 AC 75 ms
102,432 KB
testcase_14 AC 78 ms
96,072 KB
testcase_15 AC 74 ms
102,300 KB
testcase_16 AC 45 ms
68,220 KB
testcase_17 AC 68 ms
92,604 KB
testcase_18 AC 46 ms
65,604 KB
testcase_19 AC 45 ms
68,948 KB
testcase_20 AC 79 ms
101,672 KB
testcase_21 AC 51 ms
73,688 KB
testcase_22 AC 74 ms
102,376 KB
testcase_23 AC 73 ms
98,100 KB
testcase_24 AC 54 ms
80,548 KB
testcase_25 AC 85 ms
101,960 KB
testcase_26 AC 91 ms
104,204 KB
testcase_27 AC 84 ms
101,452 KB
testcase_28 AC 101 ms
113,096 KB
testcase_29 AC 100 ms
113,612 KB
testcase_30 AC 101 ms
113,360 KB
testcase_31 AC 99 ms
113,212 KB
testcase_32 AC 99 ms
113,232 KB
testcase_33 AC 105 ms
113,608 KB
testcase_34 AC 104 ms
113,484 KB
testcase_35 AC 101 ms
113,224 KB
testcase_36 AC 98 ms
113,352 KB
testcase_37 AC 104 ms
113,360 KB
testcase_38 AC 35 ms
54,272 KB
testcase_39 AC 36 ms
54,444 KB
testcase_40 AC 37 ms
54,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, random
input = lambda : sys.stdin.readline().rstrip()


write = lambda x: sys.stdout.write(x+"\n"); writef = lambda x: print("{:.12f}".format(x))
debug = lambda x: sys.stderr.write(x+"\n")
YES="Yes"; NO="No"; pans = lambda v: print(YES if v else NO); INF=10**18
LI = lambda : list(map(int, input().split())); II=lambda : int(input())
def debug(_l_):
    for s in _l_.split():
        print(f"{s}={eval(s)}", end=" ")
    print()
def dlist(*l, fill=0):
    if len(l)==1:
        return [fill]*l[0]
    ll = l[1:]
    return [dlist(*ll, fill=fill) for _ in range(l[0])]

n,x,m = list(map(int, input().split()))
a = LI()
vs = []
for v in a:
    val = 0
    while v>=x:
        v //= 2
        val += 1
    vs.append(val)
c = 0
mm = 0
for i in range(n)[::-1]:
    v = vs[i]
    if v>mm:
        c += (v-mm) * (i+1)
        mm = v
pans(c<=m)
0