why i get wrong output
#include
using namespace std;
bool fn(int*a,int s,int e,int sum,int res=false)
{
//if(sum==0)return true;
if((s>=e))
{
if(sum==0&&res)return true;
else return false;
}
return(fn(a,s+1,e,sum+a[s],true)||(fn(a,s+1,e,sum)));
}
int main()
{
int t;cin>>t;
while(t–){
int n;cin>>n;
int a[n];
for(int i=0;i<n;i++)cin>>a[i];
if(fn(a,0,n-1,0))cout<<“Yes”<<endl;
else
cout<<“No”<<endl;
}
}