結果
| 問題 |
No.1104 オンライン点呼
|
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:31:12 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 398 bytes |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 103,296 KB |
| 最終ジャッジ日時 | 2025-06-12 19:31:16 |
| 合計ジャッジ時間 | 3,315 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 1 |
ソースコード
n, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
if n == 0:
print(0)
exit()
t = [0] * n
if n >= 2:
t[1] = t[0] + A[0] + B[1]
for j in range(3, n + 1):
idx = j - 1
option1 = t[j - 2] + A[j - 2] + B[idx]
option2 = t[j - 3] + A[j - 3] + B[idx] + k
t[idx] = min(option1, option2)
max_time = max(t)
print(max_time)
gew1fw