結果

問題 No.2056 非力なレッド
ユーザー RyoSci
提出日時 2022-08-26 22:39:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 631 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 105,384 KB
最終ジャッジ日時 2024-10-13 23:17:36
合計ジャッジ時間 4,356 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 36 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit
# pypyjit.set_param('max_unroll_recursion=-1')
import sys
sys.setrecursionlimit(10**7)
def input(): return sys.stdin.readline().rstrip()


INF = 10**18

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

cnts = [0]*n
for i in range(n):
    tmp = a[i]
    cnt = 0
    while tmp >= x:
        tmp //= 2
        cnt += 1
    cnts[i] = cnt


now = 0
for i in range(n-1, -1, -1):
    cnts[i] = max(0, cnts[i]-now)
    while cnts[i] > 0:
        if i > min(n-1, m-1):
            break
        now += 1
        cnts[i] -= 1
        m -= i

if sum(cnts) == 0:
    print("Yes")
else:
    print("No")
0