回文树
lixuwei2333
这个作者很懒,什么都没留下…
展开
-
回文树模板【求不同回文字串个数】
#include <bits/stdc++.h> using namespace std; const int MAX = 1e5+100; const int ALP = 26; struct Palindromic_Tree { int son[MAX][ALP]; //转移边 int fail[MAX]; //fail 指针 int cnt[MAX]; ...原创 2019-02-18 14:40:06 · 488 阅读 · 0 评论 -
回文自动机fail树上跑dfs
回文自动机模板题:http://acm.hdu.edu.cn/showproblem.php?pid=6599 #include <bits/stdc++.h> #define pb push_back #define rep(i, a, b) for(int i = (a); i <= (b); i++) using namespace std; const int MAX...原创 2019-07-25 22:24:44 · 150 阅读 · 0 评论