結果

問題 No.2150 Site Supporter
ユーザー 👑 H20H20
提出日時 2022-12-07 22:48:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 108,544 KB
最終ジャッジ日時 2024-04-22 03:26:28
合計ジャッジ時間 2,924 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
51,328 KB
testcase_01 AC 35 ms
51,712 KB
testcase_02 AC 34 ms
51,584 KB
testcase_03 AC 34 ms
51,712 KB
testcase_04 AC 35 ms
51,456 KB
testcase_05 AC 37 ms
51,840 KB
testcase_06 AC 35 ms
51,712 KB
testcase_07 AC 36 ms
51,840 KB
testcase_08 AC 59 ms
80,512 KB
testcase_09 AC 124 ms
106,112 KB
testcase_10 AC 88 ms
96,128 KB
testcase_11 AC 111 ms
104,064 KB
testcase_12 AC 74 ms
89,856 KB
testcase_13 AC 64 ms
82,688 KB
testcase_14 AC 34 ms
51,840 KB
testcase_15 AC 35 ms
51,840 KB
testcase_16 AC 34 ms
52,096 KB
testcase_17 AC 122 ms
108,544 KB
testcase_18 AC 79 ms
92,032 KB
testcase_19 AC 56 ms
78,976 KB
testcase_20 AC 93 ms
100,224 KB
testcase_21 AC 49 ms
71,296 KB
testcase_22 AC 116 ms
106,240 KB
testcase_23 AC 35 ms
51,840 KB
testcase_24 AC 33 ms
51,712 KB
testcase_25 AC 33 ms
51,328 KB
testcase_26 AC 32 ms
51,328 KB
testcase_27 AC 82 ms
97,792 KB
testcase_28 AC 82 ms
97,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K,X = map(int, input().split())
A = list(map(int, input().split())) 
DP = [[0]*2 for _ in range(N+1)]
DP[0][1] = X
for i in range(N):
    DP[i+1][0] = min(DP[i])+A[i]
    DP[i+1][1] = min(DP[i][0]+X,DP[i][1])+K
print(min(DP[-1]))
0