#include <bits/stdc++.h>
using namespace std;
int cnt=0;
void sum(vector arr,int index,vector sub){
if(index==arr.size()){
int l = sub.size();
if(l!=0){
int sum=0;
for(int i=0;i<l;i++){
sum=sum+sub[i];
}
if(sum==0){
cnt++;
}
}
return;
}
sum(arr,index+1,sub);
sub.push_back(arr[index]);
sum(arr,index+1,sub);
}
int main(){
int t;
cin>>t;
while(t–){
int n;
cin>>n;
vector arr;
vector sub;
for(int i=0;i<n;i++){
int a;
cin>>a;
arr.push_back(a);
}
sum(arr,0,sub);
if(cnt>=1){
cout<<“Yes”<<endl;
}
else
cout<<“No”<<endl;
}
return 0;
}
what is the problem with my program I can’t figure out it is working for sample cases