字典树
左眼皮跳跳~
这个作者很懒,什么都没留下…
展开
-
HDU1251 统计难题(字典树)
Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连原创 2015-02-08 11:33:10 · 479 阅读 · 0 评论 -
HDU1671 Phone List(字典树)
Problem DescriptionGiven 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 phone catalogue listed these numbers:1. Emergenc原创 2015-02-07 18:03:09 · 918 阅读 · 0 评论 -
HDU 1800 Flying to the Mars(字典树)
Flying to the MarsTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12767 Accepted Submission(s): 4048Problem DescriptionIn t原创 2015-05-08 23:39:23 · 616 阅读 · 0 评论 -
hihoCoder #1014 : Trie树
#1014 : Trie树时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。这一天,他们遇到了一本词典,于是小Hi就向小Ho提出了那个经典的问题:“小Ho,你能不能对于每一个我给出的字符串,都在原创 2016-10-10 16:06:20 · 236 阅读 · 0 评论 -
HDU 5536 Chip Factory
#include <iostream>#include <cstdio>#include<algorithm>using namespace std;const int N = 1005;int a[N];int n,m;struct Node{ int val; Node* next[2]; Node(){ ...原创 2018-03-16 16:16:41 · 161 阅读 · 0 评论