摘要: #include#include#define n 1000005int main(){char a[1000005]={0},b[1000005]={0},c[1000005]={0};int i,count,x,y;while(gets(a)){count=0;gets(b);x=strlen(... 阅读全文
posted @ 2014-07-25 17:06 一夜成魔 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include #include #include usingnamespacestd;//这是整个kmp中最核心的地方 intget_next(constchar*t,int*next){inti=0;intj=-1;//设置j=-1,非常巧妙 intlen=strlen(t);memset(n... 阅读全文
posted @ 2014-07-25 16:29 一夜成魔 阅读(106) 评论(0) 推荐(0) 编辑