
字典树
永夜莫明
菜是原罪
展开
-
统计难题(字典树入门)
题目链接:https://vjudge.net/problem/HDU-1251Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代...原创 2019-02-05 23:16:35 · 113 阅读 · 0 评论 -
单词查找树(trie入门)
链接:https://ac.nowcoder.com/acm/problem/16864来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述在进行文法分析的时候,通常需要检测一个单词是否在我们的单词列表里。为了提高查找和定位的速度,通常都要画出与单词列表所对应的...原创 2019-08-05 21:19:57 · 224 阅读 · 0 评论 -
three arrays(字典树)
http://acm.hdu.edu.cn/showproblem.php?pid=6625题目描述There are three integer arrays a,b,c. The lengths of them are all N. You are given the full contents of a and b. And the elements in c is produced...原创 2019-08-06 16:23:34 · 248 阅读 · 0 评论 -
Finding Palindromes (exkmp+trie)
https://cn.vjudge.net/problem/POJ-3376A word is called a palindrome if we read from right to left is as same as we read from left to right. For example, "dad", "eye" and "racecar" are all palindrome...原创 2019-08-09 18:13:47 · 423 阅读 · 0 评论