Skip to content

Commit

Permalink
任意 mod 畳み込み テスト
Browse files Browse the repository at this point in the history
  • Loading branch information
potato167 committed Aug 17, 2024
1 parent c79efac commit 60c3d9b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/fps/any_mod.test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#define PROBLEM "https://judge.yosupo.jp/problem/convolution_mod_1000000007"

#include "../../fps/any_mod.hpp"
#include <bits/stdc++.h>

int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);

using mint = atcoder::modint1000000007;
int N, M;
std::cin >> N >> M;
std::vector<mint> A(N), B(M);
int a;
for (int i = 0; i < N; i++) std::cin >> a, A[i] = a;
for (int i = 0; i < M; i++) std::cin >> a, B[i] = a;
auto C = po167::convolution_mint(A, B);
for (int i = 0; i < N + M - 1; i++){
if (i) std::cout << " ";
std::cout << C[i].val();
}
std::cout << "\n";
}

0 comments on commit 60c3d9b

Please sign in to comment.