結果

問題 No.2056 非力なレッド
ユーザー tamato
提出日時 2022-08-26 21:25:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 390 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 100,224 KB
最終ジャッジ日時 2024-10-13 21:48:23
合計ジャッジ時間 4,709 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline

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

    cnt = 0
    for i in range(N - 1, -1, -1):
        while (A[i] >> cnt) >= X:
            cnt += 1
            M -= i + 1

    if M >= 0:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
0