对KMP的熟练使用View Code 我的代码 kmp匹配过去,需要熟练掌握KMP,数据范围大一点也没关系#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn = 100010;int n,mb,mc;char a[maxn],b[maxn],c[maxn];int p1[maxn],p2[maxn];void getp(int p[],int m,char b[]){ p[1]=0; int i,j=0; for(i=2;i<=m; Read More
posted @ 2012-06-12 18:25 Because Of You Views(299) Comments(0) Diggs(0) Edit