摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema 阅读全文
摘要:
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 阅读全文