- -谢谢kuangbin大佬的模板,引用一下,方便自己查阅
放一个方便理解Manacher的资料:http://www.felix021.com/blog/read.php?2040
Manacher模板 (HDU3068)
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int Create(char pszIn[],char pszOut[]) { int nLen=1; pszOut[0]='$'; //下标为0,用特殊字符,方便后面的判断 int i=0; while(pszIn[i]!='