I could not understand the dynamic programming approach of 550C Codeforces . Can anyone help me out to understand it.
Codeforces