結果

問題 No.2150 Site Supporter
ユーザー harurunharurun
提出日時 2022-12-07 02:02:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 51,560 KB
最終ジャッジ日時 2024-04-21 13:55:07
合計ジャッジ時間 6,809 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,624 KB
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 29 ms
10,752 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 AC 31 ms
10,752 KB
testcase_07 AC 29 ms
10,624 KB
testcase_08 AC 110 ms
16,160 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 555 ms
45,328 KB
testcase_12 AC 244 ms
24,040 KB
testcase_13 AC 150 ms
18,072 KB
testcase_14 AC 31 ms
10,752 KB
testcase_15 AC 30 ms
10,624 KB
testcase_16 AC 31 ms
10,624 KB
testcase_17 WA -
testcase_18 AC 285 ms
26,688 KB
testcase_19 WA -
testcase_20 AC 457 ms
37,748 KB
testcase_21 AC 72 ms
13,312 KB
testcase_22 WA -
testcase_23 AC 32 ms
10,752 KB
testcase_24 AC 32 ms
10,624 KB
testcase_25 AC 32 ms
10,752 KB
testcase_26 AC 30 ms
10,752 KB
testcase_27 AC 377 ms
32,636 KB
testcase_28 AC 353 ms
31,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

inf=10**18
s=0
N,K,X=map(int,input().split())
A=list(map(int,input().split()))
dp=[[inf,inf]for i in range(N+1)]
dp[0][0]=0
dp[0][1]=X
for i in range(N):
  dp[i+1][0]=min(dp[i+1][0],dp[i][0]+A[i])
  dp[i+1][1]=min(dp[i+1][1],dp[i][0]+A[i]+X)
  dp[i+1][0]=min(dp[i+1][0],dp[i][1]+A[i])
  dp[i+1][1]=min(dp[i+1][1],dp[i][1]+K)
print(min(dp[N]))
0