Palindromic Tree
文章平均质量分 87
DT2131
Rage, rage against the dying of the light.Do not go gentle into that good night.
展开
-
URAL - 1960 Palindromes and Super Abilities
题意: 给出一个串,问对于串的每个前缀各包含多少种回文串 思路: 按http://blog.csdn.net/u013368721/article/details/42100363 所讲 回文树 的思路所写。 代码: #include using namespace std; const int MAXN = 100005 ; const int N原创 2017-03-25 18:05:03 · 409 阅读 · 0 评论 -
HDU 3068 最长回文 (回文自动机)
题意: 中文 思路: 这是一道 Manacher 模板题,Manacher 解法如下 http://blog.csdn.net/dt2131/article/details/53467397 我们也可以用回文自动机完成。 什么是回文自动机? 代码: #include #i原创 2017-03-26 07:39:47 · 526 阅读 · 0 评论