結果

問題 No.1618 Convolution?
ユーザー shiomusubi496shiomusubi496
提出日時 2021-07-22 21:30:04
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 486 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 4,468 ms
コンパイル使用メモリ 259,964 KB
実行使用メモリ 25,432 KB
最終ジャッジ日時 2023-09-24 15:48:39
合計ジャッジ時間 14,452 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,356 KB
testcase_01 AC 2 ms
4,356 KB
testcase_02 AC 391 ms
20,904 KB
testcase_03 AC 414 ms
23,756 KB
testcase_04 AC 264 ms
16,836 KB
testcase_05 AC 26 ms
4,380 KB
testcase_06 AC 445 ms
21,796 KB
testcase_07 AC 447 ms
21,792 KB
testcase_08 AC 265 ms
17,004 KB
testcase_09 AC 478 ms
25,216 KB
testcase_10 AC 418 ms
18,876 KB
testcase_11 AC 467 ms
24,004 KB
testcase_12 AC 486 ms
25,432 KB
testcase_13 AC 485 ms
25,340 KB
testcase_14 AC 485 ms
25,380 KB
testcase_15 AC 481 ms
25,388 KB
testcase_16 AC 484 ms
25,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#include<atcoder/all>
#define int long long
using namespace std;
signed main(){
    int N; cin>>N;
    vector<int> A(N),B(N);
    for(int i=0;i<N;i++)cin>>A[i];
    for(int i=0;i<N;i++)cin>>B[i];
    vector<int> C(N+1);
    for(int i=0;i<=N;i++)C[i]=i;
    vector<int> D=atcoder::convolution_ll(A,C),E=atcoder::convolution_ll(B,C);
    for(int i=0;i<2*N;i++)cout<<D[i]+E[i]<<" \n"[i==2*N-1];
}
0