I am trying to solve the practice question:
`https://www.codechef.com/learn/BC00BC15/problems/LBC13`

Despite having “Correct Answer” I’m getting wrong answer. That doesn’t even make any sense.

Here is my code!

``````#include <iostream>

int main() {
int t, W(0), X(0), Y(0), Z(0);
std::cin >> t;

while (t--) {
std::cin >> W >> X >> Y >> Z;

if (W == (X + Y) || W == (X + Z) || W == (Z + Y) || W == (X + Y + Z) ||
W == X || W == Y || W == Z) {
std::cout << "YES"
<< "\n";
} else {
std::cout << "NO"
<< "\n";
}
}
return 0;
}
``````

What’s wrong with codechef? Do THEY want me to write exact everything? That’s ridiculous.

I think X(0) is wrong. I wrote this code and accepted.

``````void _(){
int w,x,y,z;
cin>>w>>x>>y>>z;
if(w==x || w==y || w==z || w==x+y || w==x+z || w==y+z || w==x+y+z){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
``````

It doesn’t really matter actually. You’re just setting the value for X and other variables to 0, just to be safe! There is nothing wrong with it. Codechef kinda sucks at accepting the submissions, as they glitch things out even if your answers are correct! You gotta wait every 20 - 25 minutes which sucks. And yes fyi it was a glitch. My answer is correct :))