結果

問題 No.1618 Convolution?
ユーザー risujirohrisujiroh
提出日時 2021-07-22 21:36:29
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 406 ms / 2,000 ms
コード長 535 bytes
コンパイル時間 4,361 ms
コンパイル使用メモリ 231,600 KB
実行使用メモリ 25,384 KB
最終ジャッジ日時 2023-09-24 16:02:24
合計ジャッジ時間 13,090 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 363 ms
20,940 KB
testcase_03 AC 378 ms
23,904 KB
testcase_04 AC 214 ms
17,000 KB
testcase_05 AC 22 ms
4,380 KB
testcase_06 AC 384 ms
21,804 KB
testcase_07 AC 383 ms
22,012 KB
testcase_08 AC 216 ms
16,912 KB
testcase_09 AC 403 ms
25,216 KB
testcase_10 AC 361 ms
18,960 KB
testcase_11 AC 400 ms
23,892 KB
testcase_12 AC 403 ms
25,284 KB
testcase_13 AC 399 ms
25,288 KB
testcase_14 AC 406 ms
25,384 KB
testcase_15 AC 397 ms
25,368 KB
testcase_16 AC 402 ms
25,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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';
}
0