上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 56 下一页
摘要: 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h11, h22 ... hnn,吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变,且必须都是在原队形中连续的; 2、左右对称, 阅读全文
posted @ 2017-05-10 13:38 walfy 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Can you propose an 阅读全文
posted @ 2017-05-10 13:02 walfy 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等 Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S 两组case之间由空行隔开(该空行不用处理)  阅读全文
posted @ 2017-05-10 13:01 walfy 阅读(202) 评论(0) 推荐(0) 编辑
摘要: For each prefix with length P of a given string S,if S[i]=S[i+P] for i in [0..SIZE(S)-p-1], then the prefix is a “period” of S. We want to all the per 阅读全文
posted @ 2017-05-08 20:33 walfy 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me How many kinds of necklaces total have.(if two necklaces can 阅读全文
posted @ 2017-05-08 19:07 walfy 阅读(513) 评论(0) 推荐(0) 编辑
摘要: Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strin 阅读全文
posted @ 2017-05-08 17:07 walfy 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema 阅读全文
posted @ 2017-05-08 14:42 walfy 阅读(114) 评论(0) 推荐(0) 编辑
摘要: You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found 阅读全文
posted @ 2017-05-08 14:41 walfy 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 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-emp 阅读全文
posted @ 2017-05-06 22:39 walfy 阅读(571) 评论(0) 推荐(0) 编辑
摘要: Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for example. I 阅读全文
posted @ 2017-05-06 21:35 walfy 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 56 下一页