We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e280df4 commit 1b2711eCopy full SHA for 1b2711e
cp-algo/math/subset_convolution.hpp
@@ -253,7 +253,7 @@ namespace cp_algo::math {
253
if (size(g) == 1) {
254
size_t M = size(f);
255
big_vector res(n, big_vector<base>{0});
256
- big_vector<base> pw(M+1);
+ big_vector<base> pw(std::max(n, M));
257
pw[0] = 1;
258
for (size_t j = 1; j < M; j++) {
259
pw[j] = pw[j - 1] * g[0];
@@ -301,7 +301,7 @@ namespace cp_algo::math {
301
302
size_t n = size(fg);
303
big_vector<base> res(M);
304
305
306
307
0 commit comments