Getting wrong answer for SPOJ MENU problem

I am trying to solve MENU problem.
My DP state contains (daysleft,rem_budget,prev_dish,prev_dish_count).

My solution is running fine but the Judge giving me Wrong answer.

What’s wrong in my code ?

Solution link :link