![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字典树
文章平均质量分 85
键盘里的青春
加油~
展开
-
HDU 1251 统计难题 (字典树模板题)
统计难题Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 42355 Accepted Submission(s): 15233Problem DescriptionIgnatius最近遇到一个难题,老原创 2017-07-24 21:22:09 · 521 阅读 · 0 评论 -
HDU 4825 Xor Sum (01字典树模板题)
题意:给你n个数,然后q次询问,每次询问让你找指定值x与n个数中的哪个数异或后最大。01字典树的实现可以看成是把一个数的二进制字符化后插入到一颗一般的字典树中比如在01字典树种插入3时 相当于在字典树中插入00 …..00011(一共32位,这个根据具体问题)查找最大异或值的时候我们是从最高位 向下贪心查找 贪心策略为:当前查找第k位 二进制数位原创 2017-07-24 22:27:34 · 384 阅读 · 0 评论 -
HDU 5536 Chip Factory (枚举+01Trie)
Chip FactoryTime Limit: 18000/9000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3143 Accepted Submission(s): 1352Problem DescriptionJohn is a原创 2017-07-26 00:00:52 · 584 阅读 · 0 评论 -
POJ Shortest Prefixes (Trie)
Shortest PrefixesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 18887 Accepted: 8182DescriptionA prefix of a string is a substring starting at the be原创 2017-07-26 17:21:58 · 280 阅读 · 0 评论