
KMP
左眼皮跳跳~
这个作者很懒,什么都没留下…
展开
-
HDU 1686 Oulipo(kmp)
Problem DescriptionThe 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 Pa原创 2014-10-21 19:36:32 · 819 阅读 · 0 评论 -
HDU 2203 亲和串(kmp)
Problem Description人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么原创 2014-10-21 20:30:45 · 1041 阅读 · 0 评论 -
HDU 3336 Count the string(kmp)
Problem DescriptionIt 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. F原创 2014-10-21 21:12:15 · 864 阅读 · 0 评论 -
HDU 1358 Period(kmp)
next数组的应用#include#include#include#include#include#include#include#include#define L(x) (x<<1)#define R(x) (x<<1|1)#define MID(x,y) ((x+y)>>1)#define eps 1e-8using namespace std;#de原创 2014-11-14 17:14:35 · 901 阅读 · 0 评论 -
POJ 2406 Power Strings(kmp)
Language:DefaultPower StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 33335 Accepted: 13852DescriptionGiven two strings a and b we define a原创 2014-11-04 14:28:49 · 1018 阅读 · 0 评论 -
codeforce D. Password
题目来源:http://codeforces.com/contest/127/problem/DDescriptionAsterix, Obelix and their temporary buddies Suffix and Prefix has finally found the Harmony temple. However, its doors were原创 2014-11-04 14:17:04 · 1335 阅读 · 0 评论 -
HDU 2087 剪花布条(kmp)
Problem Description一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长原创 2014-10-21 22:16:12 · 778 阅读 · 0 评论 -
HDU 1711 Number Sequence(kmp)
Problem DescriptionGiven 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原创 2014-10-21 20:10:14 · 911 阅读 · 0 评论 -
hihoCOder #1015 : KMP算法
#1015 : KMP算法时间限制:1000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。这一天,他们遇到了一只河蟹,于是河蟹就向小Hi和小Ho提出了那个经典的问题:“小Hi和小Ho,你们能不能够判断一段文字(原创 2016-10-10 16:25:09 · 281 阅读 · 0 评论