#include
using namespace std;
typedef long long ll;
int main() {
// your code goes here
int T;
cin >> T;
while(T–){
int n=4;
int arr[4];
for(int i=0;i<n;i++) cin >> arr[i];
int tot = 1<<n;
bool f(false);
for(ll i=1;i<tot;i++){
ll sum=0;
for(ll j=0;j<4;j++){
int mask = 1<<j;
if(mask&i!=0)
sum+=arr[j];
}
if(sum==0)
f=true;
}
cout<<(f==true?"Yes":"No")<<endl;
}
return 0;
}
The above solution did not accepted but when i changed the line if(mask&i!=0) to if(mas&i) the solution got accepted…why? when both are same right