結果

問題 No.2056 非力なレッド
ユーザー ThetaTheta
提出日時 2022-10-07 11:57:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 514 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 47,964 KB
最終ジャッジ日時 2023-09-02 12:54:28
合計ジャッジ時間 13,776 ms
ジャッジサーバーID
(参考情報)
judge16 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
29,320 KB
testcase_01 AC 128 ms
29,440 KB
testcase_02 AC 129 ms
29,344 KB
testcase_03 AC 129 ms
29,236 KB
testcase_04 AC 123 ms
29,240 KB
testcase_05 RE -
testcase_06 AC 127 ms
29,352 KB
testcase_07 AC 127 ms
29,308 KB
testcase_08 AC 128 ms
29,304 KB
testcase_09 AC 126 ms
29,368 KB
testcase_10 RE -
testcase_11 AC 128 ms
29,412 KB
testcase_12 AC 124 ms
29,328 KB
testcase_13 WA -
testcase_14 AC 203 ms
43,184 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 174 ms
38,816 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 197 ms
43,108 KB
testcase_23 AC 243 ms
40,876 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 TLE -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np


def main():
    N, X, mp = map(int, input().split())
    monsters = np.array(list(map(int, input().split())))
    for idx in reversed(range(N)):
        if monsters[idx] >= X:
            if mp > idx:
                mask = [1]*(idx + 1) + [0]*(N-idx-1)
                monsters[mask] = [hp // 2 for hp in monsters[mask]]
                mp -= (idx + 1)
            else:
                print("No")
                break
    else:
        print("Yes")


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