My issue
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
int h,y,x;
cin>>h>>y>>x;
if(y>=x)
{
cout<<"0\n";
}
else
{
cout<<"1\n";
}
}
return 0;
}
Problem Link: CodeChef: Practical coding for everyone
@armyofficerlal
U have put the condition wrong .
I have corrected in your code.
include
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t–)
{
int h,y,x;
cin>>h>>y>>x;
if(y<x)
{
cout<<“0\n”;
}
else
{
cout<<“1\n”;
}
}
return 0;
}
also take all inputs as long long int
include
using namespace std;
int main() {
// your code goes here
long long int t;
cin>>t;
while(t–)
{
long long int h,y,x;
cin>>h>>y>>x;
if(y<=x)
{
cout<<“0\n”;
}
else
{
cout<<“1\n”;
}
}
return 0;
}