标签:i++ har void 习题 cpp char s for pre ==
void manacher(char s[],int n){
int pos=0,mx=0;
for(int i=1;i<=n;i++){
if(i<mx) p[i]=min(p[(pos<<1)-i],mx-i]);
else p[i]=1;
while(s[i+p[i]]==s[i-p[i]]) p[i]++;
if(i+p[i]>mx) mx=i+p[i],pos=i;
}
}
标签:i++ har void 习题 cpp char s for pre ==
原文地址:https://www.cnblogs.com/lsq647vsejgfb/p/9480897.html