Currently I am solving the Atcoder dp contest. Being new in DP, I am already having a hard time coming up with a valid solution. It gets more tough when most test cases pass. That means my logic is correct. But I am really clueless as to what is to be done when some tests fail.
What do you suggest should be done in this?