![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_KMP
cowboy90
这个作者很懒,什么都没留下…
展开
-
Clairewd’s message (KMP)
http://acm.hdu.edu.cn/showproblem.php?pid=4300Clairewd’s messageProblem DescriptionClairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important m原创 2013-09-29 14:38:27 · 565 阅读 · 0 评论 -
Milking Grid (二维KMP+矩阵覆盖)
http://poj.org/problem?id=2185题意:给你一个字符矩阵,求出它的最小覆盖子矩阵,即使得这个子矩阵的无限复制扩张之后的矩阵,能包含原来的矩阵。 即二维的最小覆盖子串。#include #include #include #include #include using namespace std;char str[10010][100];int转载 2013-09-29 12:13:48 · 876 阅读 · 0 评论 -
Cyclic Nacklace (KMP 循环节)
http://acm.hdu.edu.cn/showproblem.php?pid=3746题意:给你一个字符串,要求将字符串的全部字符最少循环2次需要添加的字符数。 例子: abcabc 已经循环2次,添加数为0 abcac 没有循环2次,添加字符abcac。数目为5. a#include#include#includeusing namespace std;const原创 2013-09-29 12:08:07 · 411 阅读 · 0 评论 -
Power Strings(kmp 重复子串)
http://poj.org/problem?id=2406DescriptionGiven 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 concaten原创 2013-09-26 11:02:53 · 514 阅读 · 0 评论 -
Seek the Name, Seek the Fame(kmp)
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 time seek th原创 2013-09-25 23:49:15 · 578 阅读 · 0 评论 -
Simpsons’ Hidden Talents (KMP)
http://acm.hdu.edu.cn/showproblem.php?pid=2594题意:求出最长的串长度,该串既是s1的前缀又是s2的后缀.思路:把两个字符串连起来求一下前缀数组next[]即可~当然要用”#”或者其他非小写字母连接起来防止两个字符串真的混起来,比如s1=”a”,s2=”aaaa”这种情况。代码出处#include#inclu转载 2013-09-25 20:09:41 · 561 阅读 · 0 评论 -
hdu1867 A + B for you again (KMP)
http://acm.hdu.edu.cn/showproblem.php?pid=1867A + B for you againProblem DescriptionGenerally speaking, there are a lot of problems about strings processing. Now you encounter another原创 2013-10-10 20:22:36 · 476 阅读 · 0 评论 -
hdu4763 Theme Section (KMP)
http://acm.hdu.edu.cn/showproblem.php?pid=4763Theme SectionProblem DescriptionIt's time for music! A lot of popular musicians are invited to join us in the music festival. Each of them原创 2013-10-02 10:58:43 · 1030 阅读 · 0 评论 -
pku3461 Oulipo (KMP)
http://poj.org/problem?id=3461OulipoDescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo gr原创 2013-10-02 10:38:10 · 572 阅读 · 0 评论 -
hdu1711 Number Sequence (KMP)
http://acm.hdu.edu.cn/showproblem.php?pid=1711Number SequenceProblem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 100原创 2013-10-02 10:17:46 · 493 阅读 · 0 评论 -
Best Reward (KMP 回文串的判断)
http://acm.hdu.edu.cn/showproblem.php?pid=3613Best RewardProblem DescriptionAfter an uphill battle, General Li won a great victory. Now the head of state decide to reward him with hono原创 2013-10-01 09:21:45 · 666 阅读 · 0 评论 -
poj1961 Period (KMP)
http://poj.org/problem?id=1961PeriodDescriptionFor 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原创 2013-10-01 21:06:37 · 538 阅读 · 0 评论 -
Count the string (KMP)
http://acm.hdu.edu.cn/showproblem.php?pid=3336Count the string Problem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problems. When giv原创 2013-09-29 12:42:38 · 435 阅读 · 0 评论