subset-sum problem

Whats wrong in my code ??
All my testcases are right but still its giving wrong answer.

Question link - TF01 Problem - CodeChef
Solution link - CodeChef: Practical coding for everyone

This similar to famous Coin-Change problem . You can learn about this here