judge.yosupo.jp こちらです。これを解くアルゴリズムの一つとして下記があります。 Kolpakov, Roman, and Gregory Kucherov. "Finding maximal repetitions in a word in linear time." In 40th Annual Symposium on Foundations of Computer Science (Cat. No. 99CB37039), pp. 596–604. IEEE, 1999. これをする過程で s-factorization というのが出てくるのですが、ABC-EF くらいの…