链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4110 题目: BaoBao has just found two strings and in his left pocket, where indicates the -th character in string , and indicates the -th character in string . As BaoBao is bored, he de
#include<bits/stdc++.h> using namespace std; #define maxn 500005 int p[maxn]; ]; int start; int init(){ int len=strlen(s); ; s_new[]=]='#'; ;i<len;i++){ s_new[j++]=s[i]; s_new[j++]='#'; } s_new[j]=; return j; } int manacher(){ int len=init(); ,id
链接:点击这里 #include<iostream> #include<algorithm> #include<stdio.h> #include<cstring> using namespace std; #define maxn 1000005 #define LL long long #define ull unsigned long long ; ull p[maxn+],f[maxn],ff[maxn]; int main(){ p[]=; ;j&