結果

問題 No.1618 Convolution?
ユーザー nok0nok0
提出日時 2021-07-09 23:54:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 263 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 86,820 KB
実行使用メモリ 128,920 KB
最終ジャッジ日時 2023-09-24 15:06:19
合計ジャッジ時間 10,195 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,180 KB
testcase_01 AC 70 ms
71,180 KB
testcase_02 AC 263 ms
116,400 KB
testcase_03 AC 213 ms
125,860 KB
testcase_04 AC 190 ms
110,704 KB
testcase_05 AC 97 ms
78,348 KB
testcase_06 AC 208 ms
118,092 KB
testcase_07 AC 210 ms
118,072 KB
testcase_08 AC 183 ms
111,036 KB
testcase_09 AC 235 ms
127,304 KB
testcase_10 AC 191 ms
111,632 KB
testcase_11 AC 227 ms
126,396 KB
testcase_12 AC 235 ms
128,920 KB
testcase_13 AC 233 ms
128,020 KB
testcase_14 AC 233 ms
128,696 KB
testcase_15 AC 231 ms
127,848 KB
testcase_16 AC 239 ms
128,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
res = [0 for i in range(2 * n)]
for _ in range(2):
    a = list(map(int, input().split()))
    cum, add = 0, 0
    for i in range(2 * n - 1):
        if i < n:
            add += a[i]
        else:
            add -= a[i - n]
            cum -= a[i - n] * n
        cum += add
        res[i + 1] += cum
print(*res)
0