結果

問題 No.1618 Convolution?
ユーザー chocoruskchocorusk
提出日時 2021-07-22 21:28:36
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 492 ms / 2,000 ms
コード長 935 bytes
コンパイル時間 3,291 ms
コンパイル使用メモリ 187,068 KB
実行使用メモリ 25,680 KB
最終ジャッジ日時 2023-09-24 15:40:52
合計ジャッジ時間 13,365 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 394 ms
20,900 KB
testcase_03 AC 413 ms
23,888 KB
testcase_04 AC 268 ms
17,012 KB
testcase_05 AC 26 ms
4,384 KB
testcase_06 AC 449 ms
21,796 KB
testcase_07 AC 448 ms
21,860 KB
testcase_08 AC 270 ms
17,104 KB
testcase_09 AC 483 ms
25,412 KB
testcase_10 AC 422 ms
18,976 KB
testcase_11 AC 473 ms
23,960 KB
testcase_12 AC 488 ms
25,500 KB
testcase_13 AC 490 ms
25,312 KB
testcase_14 AC 492 ms
25,360 KB
testcase_15 AC 490 ms
25,680 KB
testcase_16 AC 488 ms
25,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#include <list>
#include <atcoder/all>
#define popcount __builtin_popcount
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef pair<int, int> P;

int main()
{
	int n; cin>>n;
	vector<ll> v1(n+1), a(n+1), b(n+1);
	for(int i=1; i<=n; i++) cin>>a[i];
	for(int i=1; i<=n; i++) cin>>b[i];
	for(int i=1; i<=n; i++) v1[i]=i;
	auto w1=convolution_ll(v1, a), w2=convolution_ll(v1, b);
	for(int i=1; i<=2*n; i++){
		cout<<w1[i]+w2[i];
		if(i<2*n) cout<<" ";
	}
	cout<<endl;
    return 0;
}
0