
kmp
Neng_Miao
欢迎访问个人博客:www.nengmiao.top
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
8.10 A - 亲和串
A - 亲和串 人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。 亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含原创 2017-08-10 10:53:34 · 720 阅读 · 0 评论 -
8.11 I - Number Sequence
I - 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 mak原创 2017-08-11 10:47:42 · 594 阅读 · 0 评论 -
8.21 问题 F: #103. 子串查找
问题 F: #103. 子串查找 题目描述 这是一道模板题。 给定一个字符串 A和一个字符串 B,求 B 在 A 中的出现次数。 A中不同位置出现的 B 可重叠。 输入 输入共两行,分别是字符串 A 和字符串 B。 输出 输出一个整数,表示 B 在 A 中的出现次数。 样例输入 zyzyzyz zyz 样例输出 3 提示 1≤A,B 的长度原创 2017-08-21 16:59:12 · 857 阅读 · 0 评论 -
8.11 C - A + B for you again
C - A + B for you again Generally speaking, there are a lot of problems aboutstrings processing. Now you encounter another such problem. If you get twostrings, such as “asdf” and “s原创 2017-08-11 09:19:52 · 254 阅读 · 0 评论 -
8.11 F - Seek the Name, Seek the Fame
F - Seek the Name, Seek the Fame The little cat is so famous, that many couples tramp overhill and dale to Byteland, and asked the little cat to give names to theirnewly-born babies原创 2017-08-11 10:18:54 · 421 阅读 · 0 评论 -
8.11 B - Simpsons’ Hidden Talents
B - Simpsons’ Hidden Talents Homer: Marge, I just figured out a way to discover someof the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for example. I want t原创 2017-08-11 09:02:11 · 428 阅读 · 0 评论 -
8.11 E - Cyclic Nacklace
E - Cyclic Nacklace CC always becomes very depressed at the end of thismonth, he has checked his credit card yesterday, without any surprise, thereare only 99.9 yuan left. he is too原创 2017-08-11 10:07:45 · 393 阅读 · 0 评论 -
8.11 J - Oulipo
J - Oulipo The French authorGeorges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. Aquote from the book: Tout ava原创 2017-08-11 10:58:02 · 404 阅读 · 0 评论 -
8.11 D - Period
D - 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 toknow whether the prefix is a periodic str原创 2017-08-11 09:55:40 · 396 阅读 · 0 评论 -
8.11 G - Theme Section
G - Theme Section It's time for music! A lot of popular musicians areinvited to join us in the music festival. Each of them will play one of theirrepresentative songs. To make the p原创 2017-08-11 10:42:03 · 493 阅读 · 0 评论