![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
回文树
七九河开
这个作者很懒,什么都没留下…
展开
-
The Problem to Slow Down You UVALive - 7041 (回文树)
题目 https://cn.vjudge.net/problem/UVALive-7041 题意 求两个串的公共回文串的个数。 思路 DFS两个回文树 #include <iostream> #include<bits/stdc++.h> using namespace std; const int MAXN = 210005 ; const int N = 2...原创 2019-02-20 15:00:27 · 236 阅读 · 0 评论 -
回文树模板
const int MAXN = 210005 ; const int N = 26 ; struct Palindromic_Tree { int next[MAXN][N] ;//next指针,next指针和字典树类似,指向的串为当前串两端加上同一个字符构成 int fail[MAXN] ;//fail指针,失配后跳转到fail指针指向的节点 long long c...原创 2019-02-20 15:01:03 · 194 阅读 · 0 评论 -
The Number of Palindromes HDU - 3948 (回文树)
题目 https://cn.vjudge.net/problem/HDU-3948 题意 求出本质不同的回文串个数。 思路 回文树 #include <iostream> #include<bits/stdc++.h> using namespace std; const int MAXN = 210005 ; const int N = 26 ; struct...原创 2019-02-20 15:02:43 · 172 阅读 · 0 评论 -
CA Loves Palindromic HDU - 5658 (回文树)
题目 https://cn.vjudge.net/problem/HDU-5658 题意 给定一个串,询问l到r右多少本质不同的回文串。 思路 回文树加暴力 #include <iostream> #include<bits/stdc++.h> using namespace std; const int MAXN = 1005 ; const int N = ...原创 2019-02-20 15:05:11 · 122 阅读 · 0 评论