设字符串\(s\)长度为\(n\),以下简记\(pre_{s,i}=s_{1\dots i},suf_{s,i}=s_{n-i+1\dots n}\)
Hash
Border理论
KMP
Z函数
Trie
AC自动机
Manacher
PAM
SA
SAM