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.