結果

問題 No.2150 Site Supporter
ユーザー ShirotsumeShirotsume
提出日時 2022-12-07 01:00:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 493 bytes
コンパイル時間 406 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 103,552 KB
最終ジャッジ日時 2024-04-21 13:12:55
合計ジャッジ時間 3,550 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
53,376 KB
testcase_01 AC 52 ms
53,760 KB
testcase_02 AC 52 ms
53,632 KB
testcase_03 AC 53 ms
53,504 KB
testcase_04 AC 52 ms
53,248 KB
testcase_05 AC 52 ms
53,760 KB
testcase_06 AC 52 ms
53,760 KB
testcase_07 AC 52 ms
53,376 KB
testcase_08 AC 71 ms
69,632 KB
testcase_09 AC 124 ms
103,296 KB
testcase_10 AC 96 ms
88,448 KB
testcase_11 AC 117 ms
100,992 KB
testcase_12 AC 84 ms
81,152 KB
testcase_13 AC 75 ms
72,704 KB
testcase_14 AC 52 ms
53,888 KB
testcase_15 AC 51 ms
53,888 KB
testcase_16 AC 51 ms
53,504 KB
testcase_17 AC 132 ms
100,608 KB
testcase_18 AC 95 ms
85,888 KB
testcase_19 AC 72 ms
69,376 KB
testcase_20 AC 106 ms
95,232 KB
testcase_21 AC 70 ms
67,072 KB
testcase_22 AC 123 ms
103,552 KB
testcase_23 AC 52 ms
53,504 KB
testcase_24 AC 51 ms
53,376 KB
testcase_25 AC 52 ms
53,120 KB
testcase_26 AC 52 ms
53,376 KB
testcase_27 AC 99 ms
90,624 KB
testcase_28 AC 100 ms
90,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque, Counter
sys.setrecursionlimit(5 * 10 ** 5)
from pypyjit import set_param
set_param('max_unroll_recursion=-1')
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353
n, k, x = mi()

a = li()

dp = [0, inf]


for v in a:
    e = [0,0]
    e[0] = min(dp[0] + v, dp[1] + v)
    e[1] = min(dp[0] + k + x, dp[1] + k)
    dp = e
print(min(dp))
0