http://acm.hdu.edu.cn/showproblem.php?pid=2087
#include<stdio.h> #include<string.h> #define N 1010 int next[N],count ; void GetNext(char *s) { int k,j; next[0] = k = -1; j = 0; while(s[j]!='