7409

洛谷 P7409 SvT

洛谷传送门 考虑对反串建 SAM,设 \([i, n]\) 的后缀对应 SAM 的点是 \(a_i\)。 那么 \(\text{lcp}(s[i : n], s[j : n]) = \text{len}(\text{lca}(a_i, a_j))\)。 于是问题变成了,给定一些点,统计两两 \(\t ......
P7409 7409 SvT
共1篇  :1/1页 首页上一页1下一页尾页