bzoj 4566 [Haoi2016]找相同字符——广义后缀自动机
摘要:
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4566 每个后缀结尾处 ct[ ] = 1 ,按拓扑序 dp 一下就能求出 right 集合的大小。自动机上每个点的贡献就是 ( l [cr]-l [fa] ) * ct[0][cr] * ct 阅读全文
posted @ 2019-01-19 11:27 Narh 阅读(253) 评论(0) 推荐(0) 编辑