Skip to content

Commit 8a2b5e3

Browse files
committed
fix: not to use 998244353 in fuzz matching
1 parent a99b1b7 commit 8a2b5e3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/alfred/string/fuzz-matching.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ std::vector<long long> __fuzz_matching(
2323
std::vector<i64> res, ans(n);
2424
for (int i = 0; i < 3; i++) {
2525
for (int j = 0; j < n; j++) pt[j] *= txt[j];
26-
res = add_conv_ll(std::move(pp[2 - i]), pt);
26+
res = add_conv_ll(pp[2 - i], pt);
2727
for (int j = 0; j < n; j++) {
2828
ans[j] += c[i] * res[j];
2929
}
@@ -50,7 +50,8 @@ std::vector<int> fuzz_matching(
5050
for (int i = 0; i < n; i++) {
5151
t[i] = h[(uint8_t)txt[i]];
5252
}
53-
auto f = __fuzz_matching<998244353>(n, m, fuzz, p, t);
53+
// auto f = __fuzz_matching<998244353>(n, m, fuzz, p, t);
54+
auto f = __fuzz_matching(n, m, fuzz, p, t);
5455
for (int i = 0; i + m <= n; i++) {
5556
if (f[i + m - 1] == 0) res.push_back(i);
5657
}

0 commit comments

Comments
 (0)