結果

問題 No.2056 非力なレッド
ユーザー taiga0629kyopro
提出日時 2022-08-22 00:48:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 82,340 KB
実行使用メモリ 106,836 KB
最終ジャッジ日時 2024-10-10 06:29:58
合計ジャッジ時間 4,616 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

def sol1(n,x,m,A):
    a=A[:]
    need=[0]*(n+1)
    for i in range(n):
        while a[i]>=x:
            need[i]+=1
            a[i]//=2
    for i in range(n-1,-1,-1):
        need[i]=max(need[i],need[i+1])
    if sum(need)<=m:return "Yes"
    return "No"
n,x,m=map(int,input().split())
a=list(map(int,input().split()))
print(sol1(n,x,m,a))
0