![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串处理(KMP/AC自动机)
thesprit
譬如朝露 去日苦多
展开
-
【字典树】字典树的创建(入门详细介绍)
Part one【何谓字典树】又称单词查找树,Trie树,是一种树形结构,是一种哈希树的变种。典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计。它的优点是:利用字符串的公共前缀来减少查询时间,最大限度地减少无谓的字符串比较,查询效率比哈希树高。 字典树与字典很相似,当你要查一个单词是不是在字典树中,首先看单词的第一个字母是不是在字典的第一层,如原创 2016-07-29 15:12:16 · 8749 阅读 · 2 评论 -
【POJ 3461】 Oulipo(KMP)
OulipoTime Limit: 1000MS Memory Limit: 65536KDescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter ‘e’. He was a member of the Oulipo group.原创 2016-08-08 15:38:34 · 256 阅读 · 0 评论 -
【HDU 2222】Keywords Search(AC自动机)
Keywords SearchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionIn the modern time, Search engine came into the life of everybody like Google, Bai原创 2016-08-12 10:06:56 · 539 阅读 · 0 评论 -
【HDU 1711】Number Sequence(KMP)
Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionGiven two sequences of numbers : a[1], a[2], …… , a[N], and b[1], b[2], …… , b[M] (原创 2016-08-13 00:12:32 · 251 阅读 · 0 评论