![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
KMP
旺旺_碎_冰冰
这个作者很懒,什么都没留下…
展开
-
Number Sequence hdu 1711(kmp模板题)
Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[...原创 2018-05-21 08:53:00 · 137 阅读 · 0 评论 -
Simpsons’ Hidden Talents hdu 2594(kmp应用)
Homer: 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. I want to find out if I have a talent in politi...原创 2018-05-30 21:39:31 · 228 阅读 · 0 评论 -
Blue Jeans poj 3080(暴力&kmp)
The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was...原创 2018-05-30 19:32:41 · 241 阅读 · 0 评论 -
Seek the Name, Seek the Fame poj 2752(kmp&next数组的运用)
The 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 the name, and at the same...原创 2018-05-22 10:59:51 · 161 阅读 · 0 评论 -
Power Strings poj 2406(kmp&next找循环节)
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, exponentiat...原创 2018-05-22 10:52:26 · 159 阅读 · 0 评论 -
Period hdu 1358(kmp&前缀的周期性)
For 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 prefix is a periodic string. That is, for each i (...原创 2018-05-22 10:46:15 · 351 阅读 · 0 评论 -
Cyclic Nacklace hdu 3746(kmp&找循环节)
CC 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 left. he is too distressed and thinking about how ...原创 2018-05-21 10:02:38 · 147 阅读 · 0 评论 -
剪花布条 hdu 2087(kmp模板题)
一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符...原创 2018-05-21 09:07:36 · 277 阅读 · 0 评论 -
Oulipo hdu 1686(kmp&模式串在主串中出现了多少次)
The 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 from the book: Tout avait Pair normal, mais tout ...原创 2018-05-21 09:00:23 · 233 阅读 · 0 评论 -
Count the string hdu 3336(kmp next数组运用)
It 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-empty prefixes of this string. For example: s: "ab...原创 2018-05-31 16:41:39 · 271 阅读 · 0 评论