题目链接:https://vjudge.net/problem/POJ-3693 Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11250 Accepted: 3465 Description The repetition number of a string is defined as the maximum number R such that the s…
Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9458 Accepted: 2915 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…
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 "ababab" is 3 and "ababa" is 1. Given a…
Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6328 Accepted: 1912 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…
Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7578 Accepted: 2281 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…
Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10461 Accepted: 3234 Description The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same cons…
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 "ababab" is 3 and "ababa" is 1. Given a stri…
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 "ababab" is 3 and "ababa" is 1. Given a…
后缀数组的论文里的例题,论文里的题解并没有看懂,,, 求一个重复次数最多的连续重复子串,又因为要找最靠前的,所以扫的时候记录最大的重复次数为$ans$,扫完后再后从头暴力扫到尾找重复次数为$ans$的第一个子串的开头,break输出就可以了 #include<cmath> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N = 1000…
这是一道神奇的题目..论文里面说得不清楚,其实是这样...如果一个长度为l的串重复多次,那么至少s[1],s[l+1],s[2*l+1],..之中有相邻2个相等...设这时为j=i*l+1,k=j+l,我们这时候借助SA和RMQ O(1)求出:m=lcp(j,k),这时候,重复次数至少ans=m div l+1 . 当然,我们枚举到不一定能够是最优啊,因为你枚举的不一定是字符串的首尾..那这时候怎么办?就是论文里面说的,向前和向后匹配.我们设t=l-m mod l..可以理解为,这时候 m…