For the question no change required in february long challenge my solution was as below.
1.if any one of the coin (d) has value which doesn’t divide the amount to be paid in total (p) then the set of coins with one more coin then p/d coins is required solution.
2. otherwise check if all coins smaller than coin d divides it. If this is satisfied then print NO. Check this for all the coins.
3. otherwise required output will be
p/d - 1 no. of that coin
d/(smaller coin that doesn’t divide d) +1 no of smaller coin.
rest all zero.
I have gone through your solution and i found that your solution is too complex so i can’t say anything .
Here is my solution hope you will figure it out what’s wrong in your code CodeChef: Practical coding for everyone