2981. Find Longest Special Substring That Occurs Thrice I 一模一样,只不过 s 的长度上限从 50 增加到 5 * 10⁵

https://leetcode.com/problems/find-longest-special-substring-that-occurs-thrice-ii/

直接用上次的代码没问题。