![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
manacher
Lesroad
这个作者很懒,什么都没留下…
展开
-
BZOJ——2565最长双回文串
题目链接->传送门Description顺序和逆序读起来完全一样的串叫做回文串。比如acbca是回文串,而abc不是(abc的顺序为“abc”,逆序为“cba”,不相同)。输入长度为n的串S,求S的最长双回文子串T,即可将T分为两部分X,Y,(|X|,|Y|≥1)且X和Y都是回文串。Input一行由小写英文字母组成的字符串S。Output原创 2017-08-25 10:38:41 · 255 阅读 · 0 评论 -
BZOJ——2342双倍回文
传送门:点我DescriptionInput输入分为两行,第一行为一个整数,表示字符串的长度,第二行有个连续的小写的英文字符,表示字符串的内容。Output输出文件只有一行,即:输入数据中字符串的最长双倍回文子串的长度,如果双倍回文子串不存在,则输出0。Sample Input16ggabaabaabaaball原创 2017-08-25 10:48:21 · 279 阅读 · 0 评论 -
最长回文串模板
参考博客-->manacher算法详解题目链接-->hdu 3068#include#include#include#include#includeusing namespace std;#define N 110005char s[N],tem[N<<1];int Len[N<<1];int manacher(int len){ int i,mx=0,原创 2017-08-23 15:24:22 · 209 阅读 · 0 评论 -
hdu3294---Girls' research
Problem DescriptionOne day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps:First step: girls will write a long string (onl原创 2017-08-23 22:49:25 · 164 阅读 · 0 评论 -
hdu4513_吉哥系列故事——完美队形II
题目链接:点我#include#include#include#includeusing namespace std;#define N 100009int t[N<<1],p[N<<1];int manacher(int n){ int i,id=0,mx=0,ans=0; for(i=1; i<=n; i++) { if(mx>i)原创 2017-08-24 09:42:25 · 208 阅读 · 0 评论