
trie树
whiskey_wei
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu1247-trie树
hdu1247 #include #include #include #include using namespace std; char s[50000][105]; struct tree { tree *next[26]; int v; }; tree root; void build(char*str) { tree *p=&root; tr原创 2017-07-10 20:42:23 · 212 阅读 · 0 评论 -
cf434 B. Polycarp's phone book
题目 题意: 给你一些10位数的串,输出每个串不与其他串共有的子串; 看了别人的博客,加了一些注释。。 //思路:利用字典树把每个串的所有子串枚举出来,再互相比较 #include #include #include #include #include using namespace std; char str[70010][15]; struct tree {转载 2017-09-20 20:22:53 · 278 阅读 · 0 评论 -
tire树模板
#include using namespace std; struct node { node *next[26]; int flag; }; node root; string str[100]; void build(string s) { node *p = &root; int len = s.size(); for(in原创 2018-01-30 17:50:18 · 225 阅读 · 0 评论