I've been trying to solve this simple dp problem but I'm getting WA. I can't find anything wrong with my code. Can anybody please help me out?
Problem - http://www.codechef.com/problems/COINS
my submission - http://www.codechef.com/viewsolution/3277375