WA in A1 !


I am solving [this][1] problem.

This is my solution :


For every case I could make, it gives correct answer. But on submission I get wrong answer.

Please help what's wrong in the code. For which cases does the code go wrong? 

  [1]: http://www.codechef.com/problems/A1
  [2]: http://www.codechef.com/viewsolution/3659472

try this case…

4 8
2 2 3 4

ans should be yes…ur code is giving ans as no!!!

Hint: Go through the sum of subsets algo…:slight_smile:

1 Like