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…
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…
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…
题目链接: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…
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…
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…
后缀数组+ST表. 代填的坑. \(Code\ Below:\) #include <bits/stdc++.h> #define ll long long using namespace std; const int maxn=100000+10; int n,m,L,h[maxn],Min[maxn][18],sa[maxn],tax[maxn],rnk[maxn],tp[maxn]; char s[maxn];ll ans; void SA(){ int i,k,p;m=128; for…
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…
传送门 很容易想到,题目中的相同是指差分数组相同. 那么可以把差分数组连起来,中间加上一个没有出现过的且字典序小的数 双指针移动,用st表维护height数组中的最小值. 当然用单调队列应该也可以且更快. #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #define N 1010000 using namespace std; int n, m, t, cn…