結果
問題 |
No.2056 非力なレッド
|
ユーザー |
![]() |
提出日時 | 2025-03-20 21:09:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 124 ms / 2,000 ms |
コード長 | 490 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 82,416 KB |
実行使用メモリ | 114,680 KB |
最終ジャッジ日時 | 2025-03-20 21:10:38 |
合計ジャッジ時間 | 5,895 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
n, X, M = map(int, input().split()) A = list(map(int, input().split())) s = [] for a in A: if a < X: s.append(0) else: cnt = 0 current = a while current >= X: current //= 2 cnt += 1 s.append(cnt) # Adjust to non-increasing t = [0] * n if n == 0: print("Yes") exit() t[-1] = s[-1] for i in range(n-2, -1, -1): t[i] = max(s[i], t[i+1]) total = sum(t) if total <= M: print("Yes") else: print("No")