Roller Coaster solution codechef

Roller Coaster solution codechef

 

Chef’s son wants to go on a roller coaster ride. The height of Chef’s son is XX inches while the minimum height required to go on the ride is HH inches. Determine whether he can go on the ride or not.

Input Format Roller Coaster solution codechef

  • The first line contains a single integer TT – the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains two integers XX and HH – the height of Chef’s son and the minimum height required for the ride respectively.

Output Format

For each test case, output in a single line, YES if Chef’s son can go on the ride. Otherwise, output NO.

You may print each character of YES and NO in uppercase or lowercase (for example, yesyEsYes will be considered identical)

Roller Coaster solution codechef Constraints

  • 1T10001≤T≤1000
  • 1X,H1001≤X,H≤100

Sample Input 1 

4
15 20
50 48
32 32
38 39

Sample Output 1 

NO
YES
YES
NO

Explanation Roller Coaster solution codechef

Test case 1: Chef’s son can not go on the ride as his height << the minimum required height.

Test case 2: Chef’s son can go on the ride as his height  the minimum required height.

Test case 3: Chef’s son can go on the ride as his height  the minimum required height.

Test case 4: Chef’s son can not go on the ride as his height << the minimum required height.

Leave a Comment