摘要: 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) 编辑