結果

問題 No.2150 Site Supporter
ユーザー first_vilfirst_vil
提出日時 2022-12-09 11:39:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 106,752 KB
最終ジャッジ日時 2024-10-14 18:35:40
合計ジャッジ時間 3,174 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,x=map(int,input().split())
INF=float("inf")
dp=[0,INF]
for a in list(map(int,input().split())):
    nxt=[min(dp)+a,min(dp[0]+k+x,dp[1]+k)]
    dp=nxt
print(min(dp))
0