結果
問題 |
No.1618 Convolution?
|
ユーザー |
![]() |
提出日時 | 2021-07-23 19:07:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 510 ms / 2,000 ms |
コード長 | 540 bytes |
コンパイル時間 | 3,853 ms |
コンパイル使用メモリ | 228,964 KB |
実行使用メモリ | 25,712 KB |
最終ジャッジ日時 | 2024-07-18 14:14:02 |
合計ジャッジ時間 | 14,295 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using ll=long long; using Graph=vector<vector<pair<int,int>>>; #define MAX 100 #define MOD 998244353 #define INF 1000000000 int main(){ int N; cin>>N; vector<ll> A(N+1,0),B(N+1,0),C(N+1,0); for(int i=1;i<=N;i++){ cin>>A[i]; } for(int i=1;i<=N;i++){ cin>>B[i]; C[i]=(ll)i; } vector<ll> a=convolution_ll(A,C); vector<ll> b=convolution_ll(B,C); for(int i=1;i<=2*N;i++){ cout<<a[i]+b[i]<<" "; } cout<<endl; }