GUPTA MECHANICAL

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

Sunday 5 June 2022

[Solution] Rating Improvement CodeChef Solution | CodeChef Problem Solution 2022

Chef's current rating is X, and he wants to improve it. It is generally recommended that a person with rating X should solve problems whose difficulty lies in the range [X,X+200], i.e, problems whose difficulty is at least X and at most X+200.

You find out that Chef is currently solving problems with a difficulty of Y.

Is Chef following the recommended practice or not?

Input Format

  • The first line of input will contain a single integer T, denoting 
Solution Click Below:-  CLICK HERE

  • the number of test cases. The description of the test cases follows.
  • Each test case consists of a single line of input, containing two space-separated integers X,Y.

Output Format

For each test case, output on a new line YES if Chef is following the recommended practice style, and NO otherwise.

Each letter of the output may be printed in either lowercase or uppercase. For example, the strings YESyEs, and Yes will be considered identical.

Constraints

  • 1T100

No comments:

Post a Comment