
KMP
文章平均质量分 80
一世倾安
月明,风清,思念成灾,在梦里丰盈,化作蝶的精灵,飞跃窗棂。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 1827 ---A+B again
Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as “asdf” and “sdfg”, the result of the addition between原创 2017-03-25 12:53:40 · 236 阅读 · 0 评论 -
Kmp简单应用——Number Sequence
Given two sequences of numbers : a1 1, a2 2, ...... , aN N, and b1 1, b2 2, ...... , bM M (1 K K = b1 1, aK+1 K+1 = b2 2, ...... , aK+M−1 K+M−1 = bM M. If there are more than o原创 2017-03-25 11:17:25 · 444 阅读 · 0 评论 -
花布条
一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢?Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。Outpu原创 2017-03-25 13:48:38 · 627 阅读 · 0 评论 -
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 example:s: "ab原创 2017-03-25 15:14:29 · 246 阅读 · 0 评论 -
period
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 (2原创 2017-03-25 16:39:17 · 227 阅读 · 0 评论 -
HDU-5510 Bazinga
Ladies and gentlemen, please sit up straight. Don't tilt your head. I'm serious. For n n given strings S 1 ,S 2 ,⋯,S n S1,S2,⋯,Sn, labelled from 1 1 to n n, you should find the larg原创 2017-04-22 18:32:03 · 310 阅读 · 0 评论 -
亲和串
人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么我们就说s2 是s1的亲和串。原创 2017-03-25 14:06:21 · 374 阅读 · 0 评论 -
LibreOJ103-子串查找
#103. 子串查找内存限制:256 MiB时间限制:500 ms标准输入输出题目类型:传统评测方式:文本比较上传者: 匿名提交提交记录统计讨论测试数据题目描述这是一道模板题。给定一个字符串 A AA 和一个字符串 B BB,求 B BB 在 A AA 中的出现次数。A AA 中不同原创 2017-11-12 17:01:22 · 772 阅读 · 0 评论