Miami GP Codechef Solution | May CHALLENGE

Codechef
Share:

Miami GP Codechef Solution

Chef has finally got the chance of his lifetime to drive in the F1F1 tournament. But, there is one problem. Chef did not know about the 107% rule and now he is worried whether he will be allowed to race in the main event or not.

Given the fastest finish time as XX seconds and Chef’s finish time as YY seconds, determine whether Chef will be allowed to race in the main event or not.

Note that, Chef will only be allowed to race if his finish time is within 107% of the fastest finish time.

Input Format

  • First line will contain TT, number of testcases. Then the testcases follow.
  • Each testcase contains of a single line of input, two space separated integers XX and YY denoting the fastest finish time and Chef’s finish time respectively.

Output Format

For each test case, output YESYES if Chef will be allowed to race in the main event, else output NONO.

You may print each character of the string in uppercase or lowercase (for example, the strings YeSYeS, yEsyEs, yesyes and YESYES will all be treated as identical).

Constraints

  • 1≤T≤2⋅1041≤T≤2⋅104
  • 1≤X≤Y≤2001≤X≤Y≤200

Sample Input 1 

4
1 2
15 16
15 17
100 107

Sample Output 1 

NO
YES
NO
YES

Explanation

Test case 11: The fastest car finished in 11 second. Thus, Chef should have finished on or before 1.071.07 seconds to ensure qualification but he finished in 22 seconds. Hence, Chef will not be allowed to race in the main event.

Test case 22: The fastest car finished in 1515 seconds. Thus, Chef should have finished on or before 16.0516.05 seconds to ensure qualification and he managed to finish in 1616 seconds. Hence, Chef will be allowed to race in the main event.

Test case 33: The fastest car finished in 1515 seconds. Thus, Chef should have finished on or before 16.0516.05 seconds to ensure qualification but he finished in 1717 seconds. Hence, Chef will not be allowed to race in the main event.

Test case 44: The fastest car finished in 100100 seconds. Thus, Chef should have finished on or before 107107 seconds to ensure qualification and he finished just in time for qualification. Hence, Chef will be allowed to race in the main event.

Miami GP Codechef  SOLUTION

Download Code
login to google play console, youtube video search by image, how to add a google account, which are the google apps, what is the google app, how to add a new google account, all the google apps, which service is the part of google, adsetting google, google data studio, google DNS, GCP console, bigquery, google studio, google api console, google app engine, anthos, google apis, google public DNS, google audio, google launcher, gcloud console, google compute engine, google webmaster console, google logged-in devices, gdrive unlimited,google console tools,google studio login,my google voice,hey google service,find similar images google, my google forms, www google com bd search, search using images in google,google image search scan,google sea console,website console google, google sound, gdrive storage for students, google site console, google console login, webmaster console, searc h console, google server down, google backup login, photo finder google, google products and services, google console tool, google image check, google cloud search is used for, google dashboard studio, google voice and audio activity,gcp dashboards, google services down, google go app, google dns down, google image identifier,check picture on google,google new launcher,google image finder online,image check google google google go, image finder on google, finding images on google, photo find google, find a picture in google, find the photo on google, picture find google, image find on google, find with photo google, image finder google online, google find with image, photo finder in google, google find image search, search using image in google, search on google with image, google server down today, google server down news

Read More Post Here

Leave a Comment

Your email address will not be published. Required fields are marked *

x