Update ac-automaton.cc
This commit is contained in:
parent
2ae8b3c49a
commit
7e9510e9ce
|
@ -54,7 +54,7 @@ void solve(vector<string> ss, string t) {
|
|||
int curr = 0;
|
||||
for (auto&& c : t) {
|
||||
int x = c - 'a';
|
||||
if (!trie[curr][x]) curr = fail[curr];
|
||||
// if (!trie[curr][x]) curr = fail[curr];
|
||||
curr = trie[curr][x];
|
||||
oc[curr] += 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue