problelm link any one can help me with the dp solution of this problem… thanks for the help…
https://codeforces.com/blog/entry/83120
See official Editorial with explanation and c++ code. This might help you to get understand better.
Also you can check others submissions too by following simple two steps.
-
click on this link
https://codeforces.com/contest/1426/status -
Apply this filter ( available on below left of the page )
-
Click on any submission to see the code
1 Like