結果

問題 No.1104 オンライン点呼
ユーザー Kiri8128Kiri8128
提出日時 2020-07-03 21:53:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 81,784 KB
実行使用メモリ 96,500 KB
最終ジャッジ日時 2023-10-17 01:50:00
合計ジャッジ時間 3,859 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 80 ms
94,688 KB
testcase_02 AC 81 ms
96,500 KB
testcase_03 AC 69 ms
90,428 KB
testcase_04 AC 36 ms
53,484 KB
testcase_05 AC 35 ms
53,484 KB
testcase_06 AC 34 ms
53,484 KB
testcase_07 AC 59 ms
79,804 KB
testcase_08 WA -
testcase_09 AC 64 ms
85,628 KB
testcase_10 AC 34 ms
53,484 KB
testcase_11 AC 54 ms
74,152 KB
testcase_12 AC 60 ms
80,080 KB
testcase_13 AC 54 ms
73,404 KB
testcase_14 AC 43 ms
62,144 KB
testcase_15 AC 64 ms
83,264 KB
testcase_16 AC 69 ms
87,716 KB
testcase_17 AC 59 ms
78,016 KB
testcase_18 AC 63 ms
80,796 KB
testcase_19 AC 76 ms
89,988 KB
testcase_20 AC 76 ms
91,928 KB
testcase_21 AC 77 ms
92,216 KB
testcase_22 AC 67 ms
87,056 KB
testcase_23 AC 63 ms
82,152 KB
testcase_24 AC 50 ms
69,020 KB
testcase_25 AC 35 ms
53,484 KB
testcase_26 AC 35 ms
53,484 KB
testcase_27 AC 35 ms
53,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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