//hdu 3068
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define maxx 20000050
char str[2*maxx];
char s[maxx];
int p[maxx];
void Manacher(int *p,char *str,int len)
{
int mx=0;
int idx=0;
for(int i=1; i<len; i++)
{
p[i]=mx>i?min(p[2*idx-i],mx-i):1;
while(str[i+p[i]]==str[i-p[i]])
p[i]++;
if(i+p[i]>mx)
{
mx=i+p[i];
idx=i;
}
}
}
int main()
{
......
阅读全文