report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Frequent substring - MarisaOJ: Marisa Online Judge

Frequent substring

Time limit: 1000 ms
Memory limit: 256 MB
Given a string $S$. Find the longest string appearing at least $k$ times in $S$. ### Input - The first line contains a string $S$. - The second line contains an integer $k$. ### Output - Print the length of the longest string appearing at least $k$ times in $S$. ### Constraints - $1 \le k \le |S| \le 10^5$. ### Example Input: ``` aababbb 2 ``` Output: ``` 2 ``` #### Note: String `ab`.
String matching - Hash
String occurences 2
Repeated string
Compare substring
Palindrome substring 2
String combinations
Frequent substring
Good pairs
String rotation
Bit reversing
Repeated string 2
Topic
Binary search
String
Hashing
Rating 1200
Solution (0) Solution