poj 2406
摘要:
#include<stdio.h>
#include<string.h>
char s2[1000100];
int next[1000010];
void getnext(){ int i=1,j=0,k; next[1]=0; k=strlen(&s2[1]); while(i<=k){ if(j==0 || s2[i]==s2[j]){ i++,j++; next[i]=j; } else j=next[j]; }
}
int main(){ int t,T,n,i,j,temp; while(scanf("%s",&s2 阅读全文
posted @ 2012-06-23 23:44 c语言源码 阅读(131) 评论(0) 推荐(0) 编辑