![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字典树
fire__ice
这个作者很懒,什么都没留下…
展开
-
hdu1075
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1075 基本上是个字典树的裸题了,不过数据处理的比较麻烦,纠结了好久。。。 #include #include #include #include using namespace std; class Trie{ public: Trie(){} void init() {原创 2012-03-14 10:05:55 · 838 阅读 · 1 评论 -
hdu 3460 Ancient Printer
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3460 题意:给出N个单词,求出打印出所有单词所需的最少操作。我们可以这样量解,需要往打印机里依次入一个单词的字母,具体有三种操 作:1、打印出打印机里的单词,2、往打印里入进一个字母,3、删除打印机里的最后一个字母。 解析:有多种解法,这里说一下用字典树处理的方法吧。处理单词的时候原创 2012-09-14 20:27:39 · 357 阅读 · 0 评论