Skip to content

Commit

Permalink
Update content/strings/PalindromicTree.h
Browse files Browse the repository at this point in the history
Co-authored-by: Iván Renison <[email protected]>
  • Loading branch information
Aplietexe and IvanRenison authored Nov 5, 2024
1 parent f11d288 commit 8e0d777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/strings/PalindromicTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct PalindromicTree {
else {
ll q = ns[p].link;
while (s[i - ns[q].len - 1] != s[i]) q = ns[q].link;
q = max(1ll, ns[q].to[c]), last = ns[p].to[c] = SZ(ns);
ns.pb({ns[p].len + 2, q, 1});
last = ns[p].to[c] = SZ(ns);
ns.pb({ns[p].len + 2, max(1ll, ns[q].to[c]), 1});
}
}
};

0 comments on commit 8e0d777

Please sign in to comment.