Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 35607 Accepted: 14275 Case Time Limit: 1000MS Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days…
Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 31904 Accepted: 12876 Case Time Limit: 1000MS Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days…
The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being worried about spending so much on railway tickets (Byterland is such a big country, and he has to spend 1…
Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8669 Accepted: 2637 Description The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same conse…
POJ - 2774: 题意: 求解A,B串的最长公共字串 (摘自罗穗骞的国家集训队论文): 算法分析: 字符串的任何一个子串都是这个字符串的某个后缀的前缀. 求 A 和 B 的最长 公共子串等价于求 A 的后缀和 B 的后缀的最长公共前缀的最大值. 如果枚举 A 和 B 的所有的后缀,那么这样做显然效率低下. 由于要计算 A 的后缀和 B 的后缀 的最长公共前缀, 所以先将第二个字符串写在第一个字符串后面,中间用一个没 有出现过的字符隔开, 再求这个新的字符串的后缀数组.观察一下,看看能不能从…