Need help in understanding dp solution to this problem

Revision en1, by vpinmrcool, 2021-02-03 09:14:12

https://codeforces.com/blog/entry/79376 I have solved this problem using other method but I'm unable to understand dynamic programming solution. I'm not able to write recursive solution also. Any help will be greatly appreciated.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English vpinmrcool 2021-02-03 10:41:20 2 Tiny change: 'ositions\nI have s' -> 'ositions\n\nI have s'
en2 English vpinmrcool 2021-02-03 10:39:29 65
en1 English vpinmrcool 2021-02-03 09:14:12 288 Initial revision (published)