CodeChef April’21 Long Challenge Solution (Div 3) — World Record

Hydroid
1 min readApr 6, 2021

Problem Statement :

”Usain Bolt makes a new world record completing 100 m in 9.58 seconds”.

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

There are mainly 3 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 k1.

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

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

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

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

Problem Link: World Record

Solution:

--

--

Hydroid

Currently working as a Full Stack Developer in India