Skip to content

Commit 1103794

Browse files
committed
Fix
1 parent de15dd5 commit 1103794

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cp-algo/math/poly/impl/div.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ namespace cp_algo::math::poly::impl {
8888
auto qqf = fft::dft<base>(qq.a, N);
8989
size_t M = q0.deg() + (n + 1) / 2;
9090
typename poly::Vector A, B;
91+
A.resize((M + fft::flen - 1) / fft::flen * fft::flen);
92+
B.resize((M + fft::flen - 1) / fft::flen * fft::flen);
9193
q0f.mul(qqf, A, M);
9294
q1f.mul_inplace(qqf, B, M);
9395
q.a.resize(n + 1);
@@ -121,6 +123,8 @@ namespace cp_algo::math::poly::impl {
121123
auto qqf = fft::dft<base>(qq.a, N);
122124

123125
typename poly::Vector A, B;
126+
A.resize(((n + 1) / 2 + fft::flen - 1) / fft::flen * fft::flen);
127+
B.resize(((n + 1) / 2 + fft::flen - 1) / fft::flen * fft::flen);
124128
q0f.mul(qqf, A, (n + 1) / 2);
125129
q1f.mul_inplace(qqf, B, (n + 1) / 2);
126130
p.a.resize(n + 1);

0 commit comments

Comments
 (0)