摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2594扩展KMPView Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 const int N=50010; 6 char s1[N],s2[N]; 7 int next[N],ext[N]; 8 void getnext(char *sp) 9 {10 next[0]=strlen(sp);11 int p=0;12 while(sp[p+1] && sp[p]==sp
阅读全文