Long Long Message Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 27234 Accepted: 11084 Case Time Limit: 1000MS Descript ...
分类:
其他好文 时间:
2016-09-08 12:38:24
阅读次数:
172
Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 26601 Accepted: 10816 Case Time Limit: 1000MS Description The little cat ...
分类:
编程语言 时间:
2016-07-09 22:17:54
阅读次数:
235
后缀数组处理最长公共子串问题。 将两个串接在一起,计算height的最大值。同时要保证sa[i]和sa[i-1]在不同的串当中。 ...
分类:
编程语言 时间:
2016-05-18 21:51:52
阅读次数:
230
http://poj.org/problem?id=2774
思路:后缀数组。(摘自罗穗骞的国家集训队论文)字符串的任何一个子串都是这个字符串的某个后缀的前缀。求 A 和 B 的最长公共子串等价于求 A 的后缀和 B 的后缀的最长公共前缀的最大值。如果枚举A和 B 的所有的后缀,那么这样做显然效率低下。由于要计算 A 的后缀和 B 的后缀的最长公共前缀,所以先将第二个字符串写在第一个字符串后面,中...
分类:
其他好文 时间:
2016-05-12 15:43:31
阅读次数:
243
Description 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. ...
分类:
其他好文 时间:
2016-05-04 22:54:15
阅读次数:
213
求两个字符串的最长公共子串。 拼接两个字符串中间用特殊字符隔开,max(height[i])(2<=i<=len,suffix(sa[i])与suffix(sa[i-1])分别属于两个字符串的后缀)就是答案! 1 #include<cstdio> 2 #include<cstring> 3 #inc
分类:
编程语言 时间:
2016-02-22 22:04:16
阅读次数:
274
1 #include 2 #include 3 using namespace std; 4 char a[250000],b[110000]; 5 int sa[250000],x[250000],wv[250000],ws[250000],h[250000],rank[250000],wa[2....
分类:
编程语言 时间:
2015-11-19 18:57:41
阅读次数:
189
Description
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 railwa...
分类:
编程语言 时间:
2015-05-28 21:34:27
阅读次数:
141
Long Long Message DescriptionThe little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his moth....
分类:
其他好文 时间:
2015-04-10 15:16:07
阅读次数:
146
转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudLong Long MessageTime Limit:4000MSMemory Limit:131072KCase Time Limit:1000MSDescriptionThe little cat ...
分类:
编程语言 时间:
2015-03-20 01:11:28
阅读次数:
189