字典树
贾作真时真亦贾
吾日三省吾身
展开
-
HDU 1251 统计难题
Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串原创 2017-12-03 15:43:03 · 133 阅读 · 0 评论 -
HDU 1305 Immediate Decodability
Problem Description An encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all原创 2017-11-26 19:57:13 · 199 阅读 · 0 评论