ACM_字典树
知足--常乐
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 2072-单词数(字典树)
address:http://acm.hdu.edu.cn/showproblem.php?pid=2072Problem Description lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。Input 有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没原创 2017-08-07 17:40:02 · 499 阅读 · 0 评论 -
hdu 1305-Immediate Decodability(字典树)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1305Problem 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 anothe原创 2017-08-05 13:10:57 · 303 阅读 · 0 评论 -
hdu 1671-Phone List(字典树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1671Problem Description Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the原创 2017-08-05 17:42:14 · 352 阅读 · 0 评论 -
ACM_字典树模板
函数部分struct node { int t; node *child[2]; //看情况开大小 node() //结构体初始化 { t=0; for (int i=0 ;i<2; i++) { child[i]=NULL; } } };原创 2017-08-13 11:22:32 · 486 阅读 · 0 评论 -
hdu 1075-What Are You Talking About(Map&&字典树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1075 Problem Description Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a原创 2017-08-06 17:28:23 · 306 阅读 · 0 评论 -
hdu 3460-Ancient Printer(字典树&&贪心)
address:题目大意就是 给我一台打印机,但这台打印机比较古老,只有三种功能: 1 打印的都是小写字母 2 只能在 尾部追加 或者删除一个字母 3 打印当前单词 问输入的几个字符串 最少 多少步数可以打印完贪心+字典树既然最少步数 ,肯定 在最后一次打印时, 不再需要删除末尾单词操作, 那么肯定 最长的字符串 最后操作。 那么对应的其他 字母 都要 进行 增加和删除2步 同时,原创 2017-08-07 15:57:18 · 384 阅读 · 0 评论 -
HDU 4825 Xor Sum(字典树&&二进制)
传送门 : http://acm.hdu.edu.cn/showproblem.php?pid=4825Xor SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Total Submission(s): 3280 Accepted Submission(s): 14原创 2017-11-22 10:54:24 · 419 阅读 · 0 评论 -
hdu 1251-统计难题(字典树||map||数组)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1251Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们原创 2017-08-05 15:18:15 · 812 阅读 · 0 评论
分享