結果

問題 No.1618 Convolution?
ユーザー shiomusubi496shiomusubi496
提出日時 2021-07-22 21:30:04
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 498 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 4,197 ms
コンパイル使用メモリ 251,156 KB
最終ジャッジ日時 2025-01-23 06:09:21
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

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