2012年8月1日
摘要:
1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 2000010 5 #define MAXM 50000 6 #define MAXL 128 7 using namespace std; 8 char str[MAXN], dic[MAXM][60]; 9 int size, cnt[MAXM];10 struct node {11 int pos, fail, next[MAXL];12 void Init() {13 pos = fail = 0;14 .. 阅读全文
posted @ 2012-08-01 22:40
DrunBee
阅读(960)
评论(0)
推荐(0)
摘要:
1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 100010 5 #define MAXL 510 6 #define MAXM 128 7 using namespace std; 8 char str[MAXN]; 9 int size;10 bool vis[MAXL], flag;11 struct node {12 int pos, fail, next[MAXM];13 void Init() {14 pos = fail = 0;15 ... 阅读全文
posted @ 2012-08-01 21:53
DrunBee
阅读(578)
评论(0)
推荐(0)
摘要:
1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 1000000 5 #define MAXM 26 6 using namespace std; 7 char str[MAXN]; 8 int size, ans; 9 struct node {10 int fail, cnt, next[MAXM];11 bool vis;12 void Init() {13 fail = cnt = 0;14 vis = false;15 ... 阅读全文
posted @ 2012-08-01 21:01
DrunBee
阅读(528)
评论(0)
推荐(0)