結果
問題 | No.1618 Convolution? |
ユーザー |
![]() |
提出日時 | 2021-07-22 21:36:29 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 397 ms / 2,000 ms |
コード長 | 535 bytes |
コンパイル時間 | 3,101 ms |
コンパイル使用メモリ | 224,340 KB |
最終ジャッジ日時 | 2025-01-23 06:17:09 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/convolution> int main() { using namespace std; cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; vector<long long> a(n), b(n), c(n); for (auto&& e : a) cin >> e; for (auto&& e : b) cin >> e; iota(begin(c), end(c), 1); auto ans = atcoder::convolution_ll(c, a); auto temp = atcoder::convolution_ll(c, b); for (int i = 0; i < int(temp.size()); ++i) ans[i] += temp[i]; cout << '0'; for (auto&& e : ans) cout << ' ' << e; cout << '\n'; }