結果

問題 No.2150 Site Supporter
ユーザー H3PO4H3PO4
提出日時 2022-12-21 08:29:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 615 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 22,892 KB
最終ジャッジ日時 2023-08-11 10:42:18
合計ジャッジ時間 6,974 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,740 KB
testcase_01 AC 15 ms
7,900 KB
testcase_02 AC 14 ms
7,904 KB
testcase_03 AC 14 ms
7,820 KB
testcase_04 AC 15 ms
7,908 KB
testcase_05 AC 15 ms
7,816 KB
testcase_06 AC 15 ms
7,952 KB
testcase_07 AC 15 ms
7,744 KB
testcase_08 AC 41 ms
10,088 KB
testcase_09 AC 186 ms
21,456 KB
testcase_10 AC 99 ms
14,536 KB
testcase_11 AC 175 ms
20,636 KB
testcase_12 AC 77 ms
12,904 KB
testcase_13 AC 49 ms
10,712 KB
testcase_14 AC 15 ms
7,904 KB
testcase_15 AC 15 ms
7,896 KB
testcase_16 AC 15 ms
7,848 KB
testcase_17 AC 209 ms
22,892 KB
testcase_18 AC 92 ms
13,764 KB
testcase_19 AC 37 ms
9,808 KB
testcase_20 AC 143 ms
17,948 KB
testcase_21 AC 28 ms
9,272 KB
testcase_22 AC 187 ms
21,572 KB
testcase_23 AC 15 ms
7,744 KB
testcase_24 AC 15 ms
7,828 KB
testcase_25 AC 15 ms
7,816 KB
testcase_26 AC 15 ms
7,796 KB
testcase_27 AC 116 ms
15,920 KB
testcase_28 AC 111 ms
15,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K, X = map(int, input().split())
A = map(int, input().split())
INF = 10 ** 18
dp0, dp1 = 0, INF
for a in A:
    dp0, dp1 = min(dp0, dp1) + a, min(dp0 + X, dp1) + K
print(min(dp0, dp1))
0