Skip to content

Commit db0fc0d

Browse files
committed
add: assert of convolution_fft
1 parent bc8789c commit db0fc0d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

atcoder/convolution.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ template <class mint, internal::is_static_modint_t<mint>* = nullptr>
199199
std::vector<mint> convolution_fft(std::vector<mint> a, std::vector<mint> b) {
200200
int n = int(a.size()), m = int(b.size());
201201
int z = 1 << internal::ceil_pow2(n + m - 1);
202+
assert(mint::mod() % z == 1);
202203
a.resize(z);
203204
internal::butterfly(a);
204205
b.resize(z);

0 commit comments

Comments
 (0)