結果

問題 No.2056 非力なレッド
ユーザー shotoyooshotoyoo
提出日時 2022-08-26 22:42:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 848 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 124,588 KB
最終ジャッジ日時 2023-08-04 02:16:13
合計ジャッジ時間 7,023 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
72,284 KB
testcase_01 AC 84 ms
72,376 KB
testcase_02 AC 84 ms
72,204 KB
testcase_03 AC 84 ms
72,004 KB
testcase_04 AC 84 ms
71,952 KB
testcase_05 AC 86 ms
72,264 KB
testcase_06 AC 85 ms
72,284 KB
testcase_07 AC 85 ms
72,284 KB
testcase_08 AC 83 ms
71,956 KB
testcase_09 AC 84 ms
71,948 KB
testcase_10 AC 84 ms
72,148 KB
testcase_11 AC 85 ms
72,392 KB
testcase_12 AC 84 ms
72,376 KB
testcase_13 AC 128 ms
105,516 KB
testcase_14 AC 132 ms
105,932 KB
testcase_15 AC 125 ms
105,732 KB
testcase_16 AC 96 ms
78,780 KB
testcase_17 AC 121 ms
95,148 KB
testcase_18 AC 99 ms
77,828 KB
testcase_19 AC 97 ms
78,996 KB
testcase_20 AC 133 ms
113,620 KB
testcase_21 AC 104 ms
82,096 KB
testcase_22 AC 126 ms
105,760 KB
testcase_23 AC 127 ms
99,820 KB
testcase_24 AC 104 ms
87,868 KB
testcase_25 AC 134 ms
114,164 KB
testcase_26 AC 141 ms
118,744 KB
testcase_27 AC 136 ms
113,764 KB
testcase_28 AC 146 ms
124,232 KB
testcase_29 AC 167 ms
124,404 KB
testcase_30 AC 152 ms
124,588 KB
testcase_31 AC 148 ms
124,564 KB
testcase_32 AC 147 ms
124,264 KB
testcase_33 AC 151 ms
124,132 KB
testcase_34 AC 153 ms
124,388 KB
testcase_35 AC 146 ms
124,516 KB
testcase_36 AC 147 ms
124,556 KB
testcase_37 AC 158 ms
124,276 KB
testcase_38 AC 87 ms
72,272 KB
testcase_39 AC 85 ms
72,268 KB
testcase_40 AC 85 ms
72,500 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