Skip to content

Commit 1b2711e

Browse files
committed
Update
1 parent e280df4 commit 1b2711e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cp-algo/math/subset_convolution.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ namespace cp_algo::math {
253253
if (size(g) == 1) {
254254
size_t M = size(f);
255255
big_vector res(n, big_vector<base>{0});
256-
big_vector<base> pw(M+1);
256+
big_vector<base> pw(std::max(n, M));
257257
pw[0] = 1;
258258
for (size_t j = 1; j < M; j++) {
259259
pw[j] = pw[j - 1] * g[0];
@@ -301,7 +301,7 @@ namespace cp_algo::math {
301301
if (size(g) == 1) {
302302
size_t n = size(fg);
303303
big_vector<base> res(M);
304-
big_vector<base> pw(M+1);
304+
big_vector<base> pw(std::max(n, M));
305305
pw[0] = 1;
306306
for (size_t j = 1; j < M; j++) {
307307
pw[j] = pw[j - 1] * g[0];

0 commit comments

Comments
 (0)