Displaying wrong answer for all test cases but sample test case is giving correct answer

#include <bits/stdc++.h>
using namespace std;
void subset(int* a,int n,int i,int &count,int sum=0){

//base case
if(i==n){
if(sum==0){
count++;
}
return;
}
//recursive case
sum=sum+a[i];
subset(a,n,i+1,count,sum+a[i]);
subset(a,n,i+1,count,sum);

}

int main()
{
int testCases;
cin >> testCases;
while (testCases–)
{
int n;
cin >> n;
int v[n];
for (int i = 0; i < n; i++)
{
cin >> v[i];
}
int count=0;
subset(v,n,0,count,0);
if(count>0){
cout<<“Yes”;
}else {
cout<<“No”;
}
}

}

hi dear @uvanshika,
u has to find whether if the sum of any of the non-empty subsets of the set A is zero.
NON EMPTY,
eg
1
4
1 1 2 3 as is NO

refer