摘要: http://blog.henix.info/blog/trie-aho-corasick.html这个博客说的很清楚了。自己实现了个,留个模版View Code 1 #include<iostream> 2 #include<string> 3 #include<algorithm> 4 using namespace std; 5 6 struct node 7 { 8 struct node *fail; 9 struct node *next[26]; 10 int cnt; 11 node() 12 { 13 ... 阅读全文
posted @ 2012-09-11 22:21 Accept 阅读(352) 评论(0) 推荐(0) 编辑