
KMP
gtuif
大多数人永远都不会了解真实的你,但是他们会看到你所做的一切。。。
展开
-
A - 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, exponentiation by a non-原创 2017-08-16 10:52:18 · 286 阅读 · 0 评论 -
B - 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-08-16 10:58:09 · 232 阅读 · 0 评论 -
C - 剪花布条
一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Out原创 2017-08-16 11:00:42 · 659 阅读 · 1 评论 -
D - 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: "aba原创 2017-08-16 11:08:23 · 324 阅读 · 0 评论 -
E - Cyclic Nacklace
CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to原创 2017-08-16 11:18:00 · 200 阅读 · 0 评论 -
F - 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], a[K + 1] = b[2],原创 2017-08-16 11:21:07 · 196 阅读 · 0 评论 -
G - 怪盗基德的挑战书
“在树最美丽的那天,当时间老人再次把大钟平均分开时,我会降临在灯火之城的金字塔前,带走那最珍贵的笑容。”这是怪盗基德盗取巴黎卢浮宫的《蒙娜丽莎的微笑》这幅画时,挑战书上的内容。 但这次,怪盗基德的挑战书上出现了一串串小写字母“aaab sdfeeddd...”。柯南以小学生的眼睛,超凡高中生的头脑,快速统计各种字母频率,字符串长度,并结合挑战书出现的时间等信息,试图分析怪盗基德的意图。最后原创 2017-08-16 11:23:52 · 282 阅读 · 0 评论 -
POJ 2752 Seek the Name, Seek the Fame
Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 21535 Accepted: 11252DescriptionThe little cat is so famous, that many couples原创 2018-01-14 14:00:39 · 202 阅读 · 0 评论 -
POJ 3461 Oulipo
OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 44717 Accepted: 17890DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La原创 2018-01-14 14:04:07 · 145 阅读 · 0 评论