#include
using namespace std;
int main(){
int t;
cin>>t;
for(int test=0;test<t;test++){
int w,x,y,z;
cin>>w>>x>>y>>z;
if(w==x || w==y || w==z){
cout<<“YES”<<endl;
}
else if(w==x+y || w==y+z || w==z+x){
cout<<“YES”<<endl;
}
else{
cout<<“NO”<<endl;
}
}
}
I think you missed the case where w is equal to (x+y+z), whose answer is also “YES”.
1 Like
you missed else if (w==(x+y+z));
1 Like
You missed the case where it has to check with sum of all weights
if(w == x+y+z)
1 Like
Thank u guys All the test cases are passed