### cs1190380's blog

By cs1190380, history, 2 months ago,

Can someone please explain the tutorial(or any other approach) of the problem 808G - Anthem of Berland .I am not able to understand the tutorial.

• -20

 » 2 months ago, # | ← Rev. 3 →   +5 You can solve an easier version of that problem first here from CSES & my solution in case you need. Some idea about it's approach can be found in comments of this post. After solving the above problem from cses, you can apply the same logic, the only different thing you need is to quickly find where you will land if you try placing characters 'a' to 'z' at some index where there is a '?'. For that you can build an automaton from prefix function as described here.
•  » » 2 months ago, # ^ |   0 Thanks a lot!