2012年8月7日
摘要:
1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 60000 5 #define MAXL (1<<10) 6 #define MAXM 200 7 using namespace std; 8 struct Trie { 9 bool virus; 10 int end, fail, next[2]; 11 void Init() { 12 virus = false; 13 end = fail = next[0] = n... 阅读全文
posted @ 2012-08-07 23:13
DrunBee
阅读(578)
评论(0)
推荐(0)
摘要:
1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 100010 5 #define MAXM 26 6 #define INF 123456789 7 using namespace std; 8 struct Trie { 9 int fail, pos[2], cnt[2], len, next[MAXM]; 10 void Init() { 11 len = fail = pos[0] = pos[1] = cnt[0] = cnt[1] = ... 阅读全文
posted @ 2012-08-07 00:30
DrunBee
阅读(591)
评论(0)
推荐(0)