
字典树
追风者_
要我自我介绍,挺秃然的
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【暑训排位 #5 H】 Spy Syndrome 2 字典树 暴力优化
After observing the results of Spy Syndrome, Yash realised the errors of his ways. He now believes that a super spy such as Siddhant can’t use a cipher as basic and ancient as Caesar cipher. After many weeks of observation of Siddhant’s sentences, Yash det原创 2020-07-04 19:55:13 · 188 阅读 · 0 评论 -
【HDU 3065】 病毒侵袭持续中 AC自动机
Problem Description 小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然小t好想好想为民除害,但是小t从来不打没有准备的战争。知己知彼,百战不殆,小t首先要做的是知道这个病毒网站特征:包含多少不同的病毒,每种病毒出现了多少次。大家能再帮帮他吗? Input 第一行,一个整数N(1<=N<=原创 2020-05-13 20:08:57 · 264 阅读 · 1 评论 -
【POJ 2001】 Shortest Prefixes 字典树 哈希
Description A prefix of a string is a substring starting at the beginning of the given string. The prefixes of “carbon” are: “c”, “ca”, “car”, “carb”, “carbo”, and “carbon”. Note that the empty string is not considered a prefix in this problem, but every n原创 2020-05-11 16:02:50 · 222 阅读 · 0 评论 -
【HDU 1671】 Phone List 字典树 模板题
Problem 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 phone catalogue listed these numbers: Emergency 911 Alice 97 625 999 Bob 91 12 54 26 In this case, it’s no原创 2020-05-09 10:07:54 · 258 阅读 · 0 评论