The link to my code with the commented sample input is here
I cannot figure out what does dp[i][j] signify.
It would be great if you could explain this to me with the help of the entries at dp[29][2], dp[29][3], dp[29][4].
I have no clue why they are set to 300,101,1100 respectively.