Why none of the testcases are getting accepted?

#include
using namespace std;
bool subsetsum(int a[],int i,int n,int target,int sum){
//cout<<i<<" "<<sum<<endl;
if(i==n)
{
//cout<<sum;

	if(sum==0)
	return true;
	return false;
}


return subsetsum(a,i+1,n,target,sum+a[i]) || subsetsum(a,i+1,n,target,sum);

}
int main() {
int t;
cin>>t;
while(t–){
int n;
cin>>n;
int a[n+1];
for(int i=0;i<n;i++){
cin>>a[i];
}
int sum=0;
int target=0;
if(subsetsum(a,0,n,target,sum)){
cout<<“Yes”<<endl;
}
else{
cout<<“No”<<endl;
}

}
return 0;

}

hi @riagoel3999,
He 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

Can u please check my code?

hi @riagoel3999 refer
https://ide.codingblocks.com/s/660299