/** * 求解最长回文字串,Manacher算法o(n)求解最长回文子串问题 **/ #include<cstdio> #include<cstdlib> #include<iostream> #include<cstring> #include<cmath> #define L 2000050 using namespace std; char line[L],str[L]; int cnt[L],len1,len2; int main(){ int ans,t,i,j; scanf("%d",&t); while(t--){ scanf("%s",line); len1=strlen(line); len2=0; str[len2++]='$'; str[len2++]='#'; for(i=0;i<len1;i++){ str[len2++]=line[i]; str[len2++]='#'; } str[len2]='