World Record Problem Code: BOLT

 

Read problem statements in Bengali, Mandarin Chinese, Russian, and Vietnamese as well.

"Usain Bolt makes a new world record completing  m in  seconds". 

This news headline has been echoing in Chef's mind since  when he started his career in sprinting. This time in the  Tokyo Olympics he is determined to make a new world record. 

There are mainly  important factors that result in the variation in speed during practice and during competition.

  • The first factor is a difference in track material which results in variation in the speed at competition with respect to practice by a factor of .

  • The second factor is wind speed which results in variation in the speed at competition with respect to practice by a factor of .

  • The final factor is the maximum speed achieved during practice. If the maximum speed during practice is  m/s then in competition it will be  m/s.

Given Chef's max speed  during practice and the factors , find whether he will be able to create a new world record, i.e, can he complete m in less than  seconds?

Note: The final time displayed by the Olympics clock is showing after rounding the original time to  places of decimal and is the only measure of runners performance.

Input:

  • First line will contain , number of testcases. Then the testcases follow. 
  • Each testcase contains of a single line of input, four floats . 

Output:

Output in a single line, the answer, which should be "YES" if it's possible for Chef to create a new world record and "NO" if not.

You may print each character of the string in uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).

Constraints

  •  contain  digit after decimal.
  •  contains  digits after decimal.

Subtasks

Subtask #1 (100 points): original constraints

Sample Input:

3
1.0 1.0 1.0 10.45
1.0 1.0 1.0 10.44
1.0 1.0 0.9 10.44

Sample Output:

YES
NO
NO

Explanation:

TestCase 1: Final speed of Chef after considering all the factors will be  m / sec. So the time taken to complete the race will be  sec after rounding to  places after decimal. Since the time is strictly less than the world record time, therefore Chef can break the record.

TestCase 2: Final speed of Chef after considering all the factors will be  m / sec. So the time taken to complete the race will be  sec after rounding to  places after decimal. Since the time is equal to the world record time, therefore Chef can't break the record.

TestCase 3: Final speed of Chef after considering all the factors will be  m / sec. So the time taken to complete the race will be  sec after rounding to  places after decimal. Since the time is strictly more than the world record time, therefore Chef can't break the record.

Comments

Popular posts from this blog

How to pass parameters in webhook?

Access and modify all the resources of our Wiki.js using WikiJS API

Fahrenheit to Celsius