結果

問題 No.2056 非力なレッド
ユーザー ああいい
提出日時 2022-08-28 11:28:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 102,016 KB
最終ジャッジ日時 2024-10-15 10:14:39
合計ジャッジ時間 5,839 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X,M = map(int,input().split())
A = list(map(int,input().split()))

import sys
now = 0
for i in range(N - 1,-1,-1):
    a = A[i]
    a >>= now
    count = 0
    while a >= X:
        count += 1
        a >>= 1
    if count * (i + 1) > M:
        print('No')
        exit()
    else:
        M -= count * (i + 1)
        now += count
print('Yes')
0