2016年10月5日
摘要: Trie树 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 int trie[300010][30],sum[300010],cnt,n; 5 char s[1010][25]; 6 void insert(int le 阅读全文
posted @ 2016-10-05 17:06 Absolutezero 阅读(110) 评论(0) 推荐(0)
摘要: KMP模板题 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 int pre[1000010],m[1000010]; 5 char p[1000010],q[1000010]; 6 int KMP(int l1,int 阅读全文
posted @ 2016-10-05 14:02 Absolutezero 阅读(139) 评论(0) 推荐(0)