結果

問題 No.1618 Convolution?
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-07-22 22:12:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 266 ms / 2,000 ms
コード長 351 bytes
コンパイル時間 459 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 168,760 KB
最終ジャッジ日時 2023-09-24 17:16:35
合計ジャッジ時間 7,769 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,248 KB
testcase_01 AC 74 ms
71,284 KB
testcase_02 AC 219 ms
142,280 KB
testcase_03 AC 236 ms
156,920 KB
testcase_04 AC 204 ms
131,892 KB
testcase_05 AC 96 ms
78,472 KB
testcase_06 AC 232 ms
148,712 KB
testcase_07 AC 238 ms
148,696 KB
testcase_08 AC 205 ms
132,848 KB
testcase_09 AC 264 ms
167,336 KB
testcase_10 AC 215 ms
137,756 KB
testcase_11 AC 261 ms
163,228 KB
testcase_12 AC 262 ms
168,760 KB
testcase_13 AC 262 ms
167,776 KB
testcase_14 AC 261 ms
168,152 KB
testcase_15 AC 266 ms
167,780 KB
testcase_16 AC 261 ms
168,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
l = []
ans = [0]
plus = 0
plus2 = 0
for i in range(1,n*2):
    if i > n:
        plus -= n * l[i-n-1]
        plus2 -= l[i-n-1]
    else:
        plus2 += a[i-1] + b[i-1]
        l.append(a[i-1] + b[i-1])
    plus += plus2
    ans.append(plus)
        
print(*ans)
0