
KMP
hitol
SDUT
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
KMP简单应用
#include #include int next[1111111]; char s1[1111111],s2[1111111]; void get_next(char s[1111111]) { int i,j,len; i=0; len = strlen(s); next[0] = -1; j = -1; while(i原创 2014-02-11 21:06:35 · 706 阅读 · 0 评论 -
Power Strings
点击打开链接#include #include char s [2000000]; int next[2000000]; int main() { while(scanf("%s",s)&&s[0]!= '.' ) { int i=0,j=-1,len; next[0]=-1; while(s[i])原创 2014-02-11 21:08:27 · 655 阅读 · 0 评论