Hints From Problem: USACO 2023 US Open Contest, Silver: Pareidolia (View all problems)
- Suppose you wanted to calculate this for one substring. You could repeat this for every substring and sum, for O(n^3) solution by Solarion
- Greedy: first b, then first e after, first s after that and so on until the last e by Solarion
- Now suppose you have the answer for the prefix, the sum of B(s). Define B0 to B5(s), to be the maximum number B_i(s) such that the string bessie*B_i(s) + 'bessie'[:i] is a subsequence of the string. by Solarion
- Try to grow the answer for the prefix with DP. by Solarion
Page 1 of 1.
View links to all pages
1About • Privacy Notice • Rules • Problems list • Journal • Your profile • GitHub
Moon Symbol icon by Icons8 • Sun icon by Icons8 • Emojis from Twemoji by Twitter under CC by 4.0