結果
| 問題 |
No.2056 非力なレッド
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-07 12:12:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 700 ms / 2,000 ms |
| コード長 | 621 bytes |
| コンパイル時間 | 89 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 63,112 KB |
| 最終ジャッジ日時 | 2024-06-11 19:47:15 |
| 合計ジャッジ時間 | 23,470 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
import numpy as np
def main():
N, X, mp = map(int, input().split())
monsters = np.array(list(map(int, input().split())))
current_idx = N - 1
while current_idx >= 0:
if monsters[current_idx] < X:
current_idx -= 1
else:
if mp > current_idx:
mask = [True]*(current_idx + 1) + [False]*(N-current_idx-1)
monsters[mask] = [hp // 2 for hp in monsters[mask]]
mp -= (current_idx + 1)
else:
print("No")
break
else:
print("Yes")
if __name__ == "__main__":
main()