KMP
星星的泪痕
这个作者很懒,什么都没留下…
展开
-
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, exponent原创 2017-08-15 20:26:47 · 337 阅读 · 0 评论 -
C - 剪花布条
点击打开链接一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,原创 2017-08-15 20:29:07 · 274 阅读 · 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 think原创 2017-08-15 20:31:12 · 224 阅读 · 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原创 2017-08-15 20:32:22 · 396 阅读 · 0 评论 -
G - 怪盗基德的挑战书
点击打开链接 “在树最美丽的那天,当时间老人再次把大钟平均分开时,我会降临在灯火之城的金字塔前,带走那最珍贵的笑容。”这是怪盗基德盗取巴黎卢浮宫的《蒙娜丽莎的微笑》这幅画时,挑战书上的内容。 但这次,怪盗基德的挑战书上出现了一串串小写字母“aaab sdfeeddd...”。柯南以小学生的眼睛,超凡高中生的头脑,快速统计各种字母频率,字符串长度,并结合挑战书出现的时间等信息,原创 2017-08-15 20:33:34 · 248 阅读 · 0 评论 -
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 exampl原创 2017-08-15 20:30:07 · 270 阅读 · 0 评论