#include using namespace std; void manacher(string w, int n, int*p, int sh) { int g = 0; p[0] = 1-sh; for(int i=1;i=0?max(min(p[2*g-i],p[g]+g-i),0):0; while(i>=p[i]+sh && i+p[i]> n; string str; cin >> str; manacher(str,n,par,1); manacher(str,n,nie,0); int res = 1e9; for(int i=0;i