摘要:
还是KMP算法,有些借鉴,但是更好地理解了这种写法。 1 #include <stdio.h> 2 #include <string.h> 3 int next[1000005]; 4 char T[1000005]; 5 int main() 6 { 7 int i,j,len; 8 while(scanf("%s",T)) 9 {10 if(!strcmp(T,"."))11 break;12 i=0;j=-1;13 len = strlen(T);14 next[0] = -1... 阅读全文
posted @ 2012-05-04 21:22
Siriuslzx
阅读(188)
评论(0)
推荐(0)
2012年5月4日