随笔分类 - ACM ( 字典树( TRIE ) )
trie树--详解
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋文章作者:yx_th000文章来源:Cherish_yimi (http://www.cnblogs.com/cherish_yimi/) 转载请注明,谢谢合作。关键词:trie trie树 数据结构前几天学习了并查集和trie树,这里总结一下trie。 本文讨论一棵最简单的trie树,基于英文26个字母组成的字符串,讨论插...
阅读全文
极度 YM....自己用trie写了个伪 map....( HDU 1075 )
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋[代码][代码]MiYu原创, 转帖请注明 : 转载自 ______________白白の屋 http://www.cnblog.com/MiYuAuthor By : MiYuTest : 4Program : 1075*/#include <iostream>#include <string>u...
阅读全文
HDOJ 1247 HDU 1247 Hat’s Words ACM 1247 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址 : http://acm.hdu.edu.cn/showproblem.php?pid=1247题目描述:[代码]A hat’s word is a word in the dictionary that is the concatenation of exactly two other words ...
阅读全文
HDOJ 1800 HDU 1800 Phone List ACM 1800 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1800题目描述:[代码]In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to fin...
阅读全文
HDOJ 1671 HDU 1671 Phone List ACM 1671 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1671题目描述:[代码]Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefi...
阅读全文
HDOJ 1251 HDU 1251 统计难题 ACM 1251 IN HDU
摘要:MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1251题目描述:[代码]Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一...
阅读全文
浙公网安备 33010602011771号