GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Wednesday 4 May 2022

Roller Coaster CodeChef Solution | CodeChef Problem Solution 2022

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

Solution Click Below:-  CLICK HERE

Input Format

  • The first line contains a single integer T - the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains two integers X and H - 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)

Constraints

  • 1T1000
  • 1X,H100

Sample Input 1 

4
15 20
50 48
32 32
38 39

Sample Output 1 

NO
YES
YES
NO

Explanation

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.

Join Now for Solution:- 

No comments:

Post a Comment