![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
kmp
mumei314
这个作者很懒,什么都没留下…
展开
-
hdu4300——扩展kmp(hash转换)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4300Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing for sending it t...原创 2019-08-08 11:06:04 · 97 阅读 · 0 评论 -
hdu3336——循环节+next数组性质
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3336It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-...原创 2019-08-07 20:21:45 · 191 阅读 · 0 评论 -
hdu2594——kmp理解+next性质
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2594Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah, what is it?Homer: Take me for example...原创 2019-08-07 19:54:46 · 189 阅读 · 0 评论 -
poj3080——好题+暴力+vector妙用+kmp
题目链接:http://poj.org/problem?id=3080The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors ...原创 2019-08-07 19:30:17 · 265 阅读 · 0 评论 -
poj2752——next数组(前后缀问题)
题目链接:http://poj.org/problem?id=2752The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek t...原创 2019-08-07 19:13:51 · 510 阅读 · 0 评论 -
poj2406——经典循环节题
题目链接:Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation by...原创 2019-08-07 18:48:16 · 791 阅读 · 0 评论 -
hdu1358——经典循环节问题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1358For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the...原创 2019-08-07 17:06:33 · 161 阅读 · 0 评论 -
hdu3746——循环节经典变形题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3746CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan...原创 2019-08-07 16:59:37 · 238 阅读 · 0 评论 -
hdu2087——kmp经典变形题(求不可重叠模式串出现次数)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2087一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢?Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有...原创 2019-08-07 16:27:41 · 336 阅读 · 0 评论 -
hdu1686——kmp经典变形题(求可重叠模式串出现次数)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1686The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote...原创 2019-08-07 16:22:15 · 255 阅读 · 0 评论 -
hdu1711——kmp模板题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1711Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your ta...原创 2019-08-07 15:35:53 · 162 阅读 · 0 评论 -
poj3746——map妙用+枚举
题目链接:poj.org/problem?id=3746As we all know, grammar is very important when learning English. Now, YYF become a teacher of a primary school. The students are good at memory so they can tell the meani...原创 2019-08-08 11:45:27 · 677 阅读 · 2 评论 -
fzu1901——循环节
题目链接:http://acm.fzu.edu.cn/problem.php?pid=1901For each prefix with length P of a given string S,ifS[i]=S[i+P] for i in [0..SIZE(S)-p-1],then the prefix is a “period” of S. We want to all the pe...原创 2019-08-08 11:42:09 · 168 阅读 · 0 评论 -
hdu2609——最大最小表示法妙用+set
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2609Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell meHow many kinds of necklaces total have.(if two necklace...原创 2019-08-08 11:36:59 · 162 阅读 · 0 评论 -
hdu3374——最大最小表示法+循环节
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3374Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven st...原创 2019-08-08 11:31:42 · 163 阅读 · 0 评论 -
hdu2328——暴力+kmp+vector妙用
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2328Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like trad...原创 2019-08-08 11:26:44 · 131 阅读 · 0 评论 -
hdu1238——暴力+kmp
题目链接:acm.hdu.edu.cn/showproblem.php?pid=1238给你一个字母组成的字符串,找到这样最长的一个字符串X,它或将它左右颠倒形成的字符串是所给出任何字符串的子串Input第一行给一个整数t (1 <= t <= 10), 代表测试样例数。接下来有t组样例数据,第一行给出一个整数n, (1 <= n <= 100), 表示n个字符...原创 2019-08-08 11:20:15 · 142 阅读 · 0 评论 -
kuangbin带你飞 KMP & 扩展KMP & Manacher总结(一)
终于把kmp给搞完了,这两天会把所有的题以及一些重要的知识点总结一下。这一章先讲一下kmp的部分题和重要点,kmp算法讲解可以看这几篇文章:(原创)详解KMP算法 从头到尾彻底理解KMPKMP算法最浅显理解——一看就明白kmp算法主要的作用有三点:单个字符的匹配,循环节以及前后缀问题。先抛出kmp的代码实现:#include <iostream>usin...原创 2019-08-08 09:31:16 · 267 阅读 · 0 评论