結果

問題 No.1618 Convolution?
ユーザー t98slidert98slider
提出日時 2021-07-22 22:01:16
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 486 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 3,591 ms
コンパイル使用メモリ 226,704 KB
実行使用メモリ 25,488 KB
最終ジャッジ日時 2023-09-24 16:56:44
合計ジャッジ時間 13,440 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 387 ms
20,944 KB
testcase_03 AC 412 ms
24,152 KB
testcase_04 AC 267 ms
17,228 KB
testcase_05 AC 26 ms
4,376 KB
testcase_06 AC 448 ms
22,036 KB
testcase_07 AC 446 ms
21,912 KB
testcase_08 AC 262 ms
17,004 KB
testcase_09 AC 473 ms
25,292 KB
testcase_10 AC 415 ms
18,836 KB
testcase_11 AC 463 ms
23,976 KB
testcase_12 AC 479 ms
25,444 KB
testcase_13 AC 483 ms
25,488 KB
testcase_14 AC 486 ms
25,268 KB
testcase_15 AC 479 ms
25,360 KB
testcase_16 AC 484 ms
25,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<atcoder/all>
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin>>n;
    vector<long long> a(n),b(n),c(n);
    for(auto &&v:a)cin>>v;
    for(auto &&v:b)cin>>v;
    iota(c.begin(),c.end(),1);
    auto c1=atcoder::convolution_ll(a,c);
    auto c2=atcoder::convolution_ll(b,c);
    cout<<0;
    for(int i=0;i<2*n-1;i++){
        cout<<" "<<c1[i]+c2[i];
    }
    cout<<endl;
}
0