Skip to content

Commit 5195a0b

Browse files
committed
Fixes
1 parent fc41a79 commit 5195a0b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

verify/poly/roots.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void find_roots_impl(polyn const& p, vector<base> &res) {
1515
if(p.deg() == 1) {
1616
res.push_back(-p[0] / p[1]);
1717
} else if(p.deg() > 1) {
18-
auto A = polyn::gcd(polyn({rng(), 1}).powmod((mod - 1) / 2, p) - base(1), polyn(p));
18+
auto A = polyn::gcd(polyn(vector<base>{rng(), 1}).powmod((mod - 1) / 2, p) - base(1), polyn(p));
1919
find_roots_impl(A, res);
2020
find_roots_impl(p / A, res);
2121
}

verify/poly/wildcard.test.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ using fft::point;
1414
using fft::cvector;
1515

1616
void semicorr(auto &a, auto &b) {
17-
b.resize(size(a));
1817
a.fft();
1918
b.fft();
2019
a.dot(b);
@@ -39,10 +38,9 @@ string matches(string const& A, string const& B, char wild = '*') {
3938
}
4039
}
4140
array ST = {&A, &B};
42-
cvector P[2];
41+
vector<cvector> P(2, size(A));
4342
for(int i: {0, 1}) {
44-
size_t N = size(*ST[i]);
45-
P[i].resize(N);
43+
size_t N = ST[i]->size();
4644
for(size_t k = 0; k < N; k++) {
4745
char c = ST[i]->at(k);
4846
size_t idx = i ? N - k - 1 : k;

0 commit comments

Comments
 (0)