結果
| 問題 |
No.2056 非力なレッド
|
| コンテスト | |
| ユーザー |
RyoSci
|
| 提出日時 | 2022-08-26 22:52:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 643 bytes |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 82,020 KB |
| 実行使用メモリ | 105,216 KB |
| 最終ジャッジ日時 | 2024-10-13 23:29:48 |
| 合計ジャッジ時間 | 4,101 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 WA * 2 |
ソースコード
# 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 not (0 <= i <= min(n-1, m-1)):
break
now += 1
cnts[i] -= 1
m -= i
if sum(cnts) == 0:
print("Yes")
else:
print("No")
RyoSci