Topcoder DP Problem
I read the editorial of the this Problem but i am not able to get the idea, would anyone like to help me to understand the solution of problem .
ICPC NA North Central and South Division