結果

問題 No.2056 非力なレッド
ユーザー ThetaTheta
提出日時 2022-10-07 12:12:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 321 ms / 2,000 ms
コード長 621 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 51,328 KB
最終ジャッジ日時 2023-09-02 13:06:07
合計ジャッジ時間 9,903 ms
ジャッジサーバーID
(参考情報)
judge13 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
29,424 KB
testcase_01 AC 123 ms
29,364 KB
testcase_02 AC 122 ms
29,364 KB
testcase_03 AC 120 ms
29,592 KB
testcase_04 AC 124 ms
29,412 KB
testcase_05 AC 127 ms
29,512 KB
testcase_06 AC 121 ms
29,468 KB
testcase_07 AC 120 ms
29,420 KB
testcase_08 AC 122 ms
29,584 KB
testcase_09 AC 121 ms
29,264 KB
testcase_10 AC 123 ms
29,412 KB
testcase_11 AC 119 ms
29,380 KB
testcase_12 AC 123 ms
29,460 KB
testcase_13 AC 214 ms
43,648 KB
testcase_14 AC 197 ms
43,052 KB
testcase_15 AC 216 ms
43,268 KB
testcase_16 AC 135 ms
30,864 KB
testcase_17 AC 172 ms
38,952 KB
testcase_18 AC 122 ms
30,064 KB
testcase_19 AC 138 ms
31,436 KB
testcase_20 AC 234 ms
45,908 KB
testcase_21 AC 146 ms
32,776 KB
testcase_22 AC 189 ms
43,256 KB
testcase_23 AC 235 ms
40,936 KB
testcase_24 AC 163 ms
35,744 KB
testcase_25 AC 240 ms
46,796 KB
testcase_26 AC 256 ms
48,088 KB
testcase_27 AC 250 ms
47,048 KB
testcase_28 AC 269 ms
50,984 KB
testcase_29 AC 268 ms
51,132 KB
testcase_30 AC 314 ms
51,116 KB
testcase_31 AC 273 ms
51,096 KB
testcase_32 AC 276 ms
51,124 KB
testcase_33 AC 321 ms
51,328 KB
testcase_34 AC 244 ms
51,216 KB
testcase_35 AC 274 ms
51,096 KB
testcase_36 AC 188 ms
51,256 KB
testcase_37 AC 252 ms
51,144 KB
testcase_38 AC 128 ms
29,424 KB
testcase_39 AC 127 ms
29,456 KB
testcase_40 AC 124 ms
29,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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()
0