摘要:Front compressionTime Limit: 5000/5000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 158Accepted Submission(s): 63Problem DescriptionFront compression is a type of delta encoding compression algorithm whereby common prefixes and their lengths are recorded so that th
阅读全文
摘要:怪盗基德的挑战书Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 345Accepted Submission(s): 163Problem Description “在树最美丽的那天,当时间老人再次把大钟平均分开时,我会降临在灯火之城的金字塔前,带走那最珍贵的笑容。”这是怪盗基德盗取巴黎卢浮宫的《蒙娜丽莎的微笑》这幅画时,挑战书上的内容。 但这次,怪盗基德的挑战书上出现了一串串小写字母“aaab sdfeeddd...”。柯南以小学生的眼睛..
阅读全文
摘要:Life FormsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7322Accepted:2011DescriptionYou may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and the like. A few bear no human resemblance; thes
阅读全文
摘要:Common SubstringsTime Limit:5000MSMemory Limit:65536KTotal Submissions:5495Accepted:1822DescriptionA substring of a stringTis defined as:T(i,k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|.Given two stringsA,Band one integerK, we defineS, a set of triples (i,j,k):S= {(i,j,k) |k≥K,A(i,k)=B(j,k)}.You are to give th
阅读全文
摘要:Maximum repetition substringTime Limit:1000MSMemory Limit:65536KTotal Submissions:5292Accepted:1573DescriptionThe repetition number of a string is defined as the maximum numberRsuch that the string can be partitioned intoRsame consecutive substrings. For example, the repetition number of "ababa
阅读全文
摘要:PalindromeTime Limit:1000MSMemory Limit:16384KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionThe “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Unlimited» has infiltrated into “U.S. Ro
阅读全文
摘要:题目链接:http://www.spoj.com/problems/DISUBSTR/694. Distinct SubstringsProblem code: DISUBSTRGiven a string, we need to find the total number of its distinct substrings.InputT- number of test cases. T<=20;Each test case consists of one string, whose length is <= 1000OutputFor each test case output
阅读全文
摘要:Milk PatternsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7586Accepted:3448Case Time Limit:2000MSDescriptionFarmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can't predict the quality of mi
阅读全文
摘要:Musical ThemeTime Limit:1000MSMemory Limit:30000KTotal Submissions:14334Accepted:4945DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this representation
阅读全文