Loserinlife's blog

By Loserinlife, history, 5 weeks ago, In English

Given the string s. Find a maximum integer k such that there is a non-empty substring in the string s that is a concatenation of

k equal strings. This problem is from: https://mirror.codeforces.com/edu/course/2/lesson/2/5/practice/contest/269656/problem/F

|s| <= 4e5

Thanks!

  • Vote: I like it
  • -22
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

Just find all runs of string. With, for example, Crochemore's algo.