I’m wondering if it’s possible to solve the problem https://codeforces.net/problemset/problem/1383/A?locale=en with the additional constraint that, instead of being able to select sunsets of the same letter, that you can only select adjacent consecutive substrings all of the same letter. What time constraints could this be solved in?