不可重叠最长重复子串http://poj.org/problem?id=1743 1 #include 2 #include 3 using namespace std; 4 class Suffix_Array { ///后缀数组 5 static const int MV=20010;...
分类:
编程语言 时间:
2014-10-16 19:46:43
阅读次数:
290
总结了几天的后缀数组,终于完成了。不可重叠重复串;可重叠k次重复串; 不相同子串个数最长回文子串 连续重复子串重复次数最多的连续重复子串最长公共子串长度不小于k 的公共子串的个数不小于k 个字符串中的最长子串出现或反转后出现在每个字符串中的最长子串3个字符串,问其中公共子串分别为1,2,3...l的...
分类:
编程语言 时间:
2014-10-16 02:57:51
阅读次数:
309
题目描述:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette...
分类:
其他好文 时间:
2014-10-09 02:29:17
阅读次数:
178
Description
The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of ...
分类:
其他好文 时间:
2014-09-28 19:34:34
阅读次数:
417
Description
Farmer 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 milk f...
分类:
其他好文 时间:
2014-09-26 19:26:18
阅读次数:
234
Description
A 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 ...
分类:
其他好文 时间:
2014-09-25 23:11:58
阅读次数:
239
suffix-array-for-longest-repeated-string
分类:
其他好文 时间:
2014-09-25 14:06:58
阅读次数:
178
http://blog.csdn.net/ysu108/article/details/7795479求一个字符串中连续出现的次数最多的子串。例如字符串“abababc”,最多连续出现的为ab,连续出现三次。要和求一个字符串中的最长重复子串区分开来,还是上面的字符串,那么最长的重复子串为abab。两...
分类:
其他好文 时间:
2014-09-10 19:08:10
阅读次数:
222
题目链接:uva 11855 - Buzzwords
题目大意:给定一个字符串,输出重复子串长度大于1的重复次数(每种长度只算一个次数最多的),并且按照从大到小输出。
解题思路:后缀数组,处理处后缀数组,然后枚举子串长度,按照长度分段即可。
#include
#include
#include
#include
using namespace std;
const int ...
分类:
其他好文 时间:
2014-09-04 23:44:20
阅读次数:
477
【编程珠玑-15章】Strings of pearls,讲了字符的频率如何统计,以及一个经典问题“字符串中的最大重复子串”...
分类:
其他好文 时间:
2014-09-02 14:17:54
阅读次数:
254