KMP
The__sea
努力,上进,加油!!!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ - 2406 Power Strings
点击打开链接 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, exponent原创 2017-08-18 19:52:17 · 259 阅读 · 0 评论 -
HDU - 2087 剪花布条
点击打开链接 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,原创 2017-08-18 19:57:28 · 342 阅读 · 0 评论 -
HDU - 3336 Count the string
点击打开链接 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 ex原创 2017-08-18 20:09:50 · 495 阅读 · 0 评论 -
HDU - 1711 Number Sequence
点击打开链接 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],原创 2017-08-18 20:30:40 · 352 阅读 · 0 评论 -
HDU - 4552 怪盗基德的挑战书
点击打开链接 “在树最美丽的那天,当时间老人再次把大钟平均分开时,我会降临在灯火之城的金字塔前,带走那最珍贵的笑容。”这是怪盗基德盗取巴黎卢浮宫的《蒙娜丽莎的微笑》这幅画时,挑战书上的内容。 但这次,怪盗基德的挑战书上出现了一串串小写字母“aaab sdfeeddd...”。柯南以小学生的眼睛,超凡高中生的头脑,快速统计各种字母频率,字符串长度,并结合挑战书出现的时间等信原创 2017-08-18 20:39:10 · 434 阅读 · 0 评论 -
串基本操作的实现
BF算法 #include //输入字符串用gets函数,故i,j从0开始 #include #define OK 1 #define ERROR -1 #define Status int #define MAXSIZE 255 using namespace std; typedef struct //定长存储 { char ch[MAXSIZE原创 2017-12-18 15:14:37 · 3889 阅读 · 1 评论
分享