摘要:
Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strin... 阅读全文
摘要:
求模式串在待匹配串的出现次数。Input第一行是一个数字T,表明测试数据组数。之后每组数据都有两行:第一行为模式串,长度不大于10000;第二行为待匹配串,长度不大于1000000。所有字符串只由大写字母组成。Output每组数据输出一行结果。Sample Input... 阅读全文
摘要:
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... 阅读全文
摘要:
人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。 亲和串的... 阅读全文
摘要:
PJ的女朋友是一个书法家,喜欢写一些好看的英文书法。有一天PJ拿到了她写的纸条,暗示要送给他生日礼物。PJ想知道自己想要的礼物是不是就是她送的,于是想看看自己想要的在纸条中出现了多少次。Input第一行输入一个整数代表数据的组数每组数据第一行一个字符串 W代表PJ想要... 阅读全文
摘要:
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 ... 阅读全文