結果

問題 No.2056 非力なレッド
ユーザー RyoSciRyoSci
提出日時 2022-08-26 22:57:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 644 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 105,088 KB
最終ジャッジ日時 2024-04-22 01:01:39
合計ジャッジ時間 5,291 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,968 KB
testcase_01 AC 37 ms
51,840 KB
testcase_02 AC 37 ms
51,840 KB
testcase_03 AC 38 ms
51,840 KB
testcase_04 AC 37 ms
51,968 KB
testcase_05 AC 37 ms
51,584 KB
testcase_06 AC 36 ms
51,968 KB
testcase_07 AC 35 ms
51,968 KB
testcase_08 AC 36 ms
51,968 KB
testcase_09 AC 37 ms
51,968 KB
testcase_10 AC 37 ms
51,840 KB
testcase_11 AC 38 ms
51,712 KB
testcase_12 AC 37 ms
51,840 KB
testcase_13 AC 79 ms
92,416 KB
testcase_14 AC 87 ms
96,000 KB
testcase_15 AC 77 ms
92,416 KB
testcase_16 AC 49 ms
63,360 KB
testcase_17 AC 76 ms
85,120 KB
testcase_18 AC 51 ms
63,232 KB
testcase_19 AC 51 ms
64,768 KB
testcase_20 AC 95 ms
99,840 KB
testcase_21 AC 58 ms
69,888 KB
testcase_22 AC 86 ms
93,184 KB
testcase_23 AC 89 ms
89,472 KB
testcase_24 AC 62 ms
74,624 KB
testcase_25 AC 87 ms
100,736 KB
testcase_26 AC 97 ms
105,088 KB
testcase_27 AC 92 ms
100,736 KB
testcase_28 AC 99 ms
102,016 KB
testcase_29 AC 102 ms
101,888 KB
testcase_30 AC 106 ms
101,760 KB
testcase_31 AC 103 ms
101,632 KB
testcase_32 AC 110 ms
101,632 KB
testcase_33 AC 104 ms
102,144 KB
testcase_34 AC 108 ms
101,632 KB
testcase_35 AC 101 ms
102,016 KB
testcase_36 AC 107 ms
101,760 KB
testcase_37 AC 113 ms
101,888 KB
testcase_38 AC 41 ms
52,096 KB
testcase_39 AC 38 ms
51,840 KB
testcase_40 AC 36 ms
51,840 KB
権限があれば一括ダウンロードができます

ソースコード

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 k in range(n, 0, -1):
    cnts[k-1] = max(0, cnts[k-1]-now)
    while cnts[k-1] > 0:
        if not (1 <= k <= min(n, m)):
            break
        now += 1
        cnts[k-1] -= 1
        m -= k

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