摘要:
PalindromeTime Limit: 15000MS Memory Limit: 65536KTotal Submissions: 2939 Accepted: 1081DescriptionAndy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Can you propose an efficient algorithm to find the length of the 阅读全文
摘要:
最长回文Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6048 Accepted Submission(s): 2073Problem Description给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S两组case之间由空行隔... 阅读全文
摘要:
转自:http://bbs.dlut.edu.cn/bbstcon.php?board=Competition&gid=23474如何在O(n)时间内处理字符串以每个位置为中心的最长回文。这里转载一个Manacher算法的论文翻译。原文地址:http://zhuhongcheng.wordpress.com/2009/08/02/a-simple-linear-time-algorithm-for-finding-longest-palindrome-sub-string/ 其实原文说得是比较清楚的,只是英文的,我这里写一份中文的吧。 首先:大家都知道什么叫回文串吧,这个算法要解决的就 阅读全文
摘要:
Greatest Common Increasing SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3079 Accepted Submission(s): 969Problem DescriptionThis is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. In... 阅读全文