Https://ide.codingblocks.com/s/53905

Subset Sum Easy

Mike is a very passionate about sets. Lately, he is busy solving one of the problems on sets. He has to find whether if the sum of any of the non-empty subsets of the set A is zero.
Input Format:

The first line contains an integer T, which is the total number of test cases. T

test cases follow.

Each test case consists of two lines.

The first line consists of a single integer N, which is the number of elements

present in the set A.

The second line contains the integer in the set.
Constraints:

1 ≤ T ≤10
1 ≤ N ≤ 4
-10^5 ≤ A[i] ≤ 10^5

Output Format:

If the sum of any of the subset is zero, then print “Yes” (without

quotes) else print “No”(without quotes).
Sample Input:

1
4
1 2 3 -3

Sample Output:

Yes

https://ide.codingblocks.com/s/53905
Sample input passed but test cases are showing wrong answer.

Hi Aastha, try to post one doubt only once. I’ve replied to this doubt on the other thread. Check it out.