This is weird that my code executes testcase successfully and still on submission it shows wrong answer. Can anyone tell me what’s wrong with this. Atleast codechef should provide the test case where my code fails.
Here is the problem link
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
int day1,day2;
int D,C;
cin>>D>>C;
int A1,A2,A3;
cin>>A1>>A2>>A3;
int B1,B2,B3;
cin>>B1>>B2>>B3;
day1=A1+A2+A3;
day2=B1+B2+B3;
int penalty=0;
if(day1<=150)
{
penalty+=D;
}
if(day2<=150)
{
penalty+=D;
}
int withCoupon=day1+day2+C+penalty;
int withoutCoupon=day1+day2+D+D;
if(withCoupon<withoutCoupon)
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
}
}