Help me in solving MONSTER1 problem

My issue

i want explanation for this problem and code

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
	}
}

Learning course: Prepare for your DSA interviews
Problem Link: CodeChef: Practical coding for everyone

@satya64
plzz refer my c++ solution for better understanding of the logic.

#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<<"0"<<endl;
        }
        else {
            cout<<"1"<<endl;
        }   
    }
}