![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字典树
梦玉
这个作者很懒,什么都没留下…
展开
-
hdu1247Hat’s Words
Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the hat’s words in a dictionary. Inpu原创 2015-05-17 16:42:44 · 456 阅读 · 0 评论 -
hdu1251统计难题
普通字典树 题目思路: 建立一个普通字典树,每个节点内使用一个flag来统计该前缀出现次数即可 #include #include #include #include using namespace std; typedef struct node{ int flag;//统计 struct node *next[26]; }Trie; void insertTrie(T原创 2015-05-18 20:20:53 · 333 阅读 · 0 评论 -
hdu1671Phone List
普通字典树 建立普通字典树,用flag 标记,注意释放内存空间 #include #include #include #include using namespace std; typedef struct node{ int flag; struct node *next[10]; }Trie; void insertTrie(Trie *root,char *c){原创 2015-05-18 21:46:22 · 367 阅读 · 0 评论 -
hdu1075字典树解法
字典树 本题大意为先给你一个火星文字典,里面对应的每一个国兴文字对应一个地球文字,然后给出一串火星文字,要求你将其翻译成地球文,在字典中找不到的文字按原样输出 直接用简单的字典树处理 但要注意一些特殊的数据.如 START a b c d ab cd ac ef ef ab END START abcd abcd ef ac END wrong output原创 2015-05-18 17:44:40 · 405 阅读 · 0 评论