Help me in solving MONSTER1 problem

My issue

include
using namespace std;
int main() {

int T;
cin>> T;
while(T--) {
    long H,X,Y;
    cin>>H>>X>>Y;
    if(X<=Y) {
        cout<<"0"<<endl;
    }
    else {
        cout<<"1"<<endl;
    }
    
    
    
}

#include<iostream>

using namespace std;
int main() {

int T;
cin>> T;
while(T--) {
    int H,X,Y;
    cin>>H>>X>>Y;
    if(X>Y) {
        cout<<"1"<<endl;
    }
    else {
        cout<<"0"<<endl;
    }
    
    
    
}

}

}

what differnce it makes second isa wrong answer how

My code

#include<iostream>
using namespace std;
int main() {
    
    int T;
    cin>> T;
    while(T--) {
        int H,X,Y;
        cin>>H>>X>>Y;
        if(X>Y) {
            cout<<"1"<<endl;
        }
        else {
            cout<<"0"<<endl;
        }
        
        
        
    }
    
    
    
}



Problem Link: CodeChef: Practical coding for everyone

@gnaneshwar718
The difference is taking inputs in long data type cozz for constraints upto 10^18 the int data type will overflow.