No.1980 [Cherry 4th Tune D] Stopping Distance
タグ : / 解いたユーザー数 60
作問者 : 👑
Kazun
/ テスター :
hamuhei4869
👑 Supplementary Material (explanations of terms appearing in the problem statement and of the situation; you do not need to read this)
The distance from when a driver senses danger (recognizes an obstacle) and presses the brake until the car stops is called the stopping distance. The stopping distance is expressed as the sum of the free running distance and the braking distance.
- The free running time is the time from when the driver senses danger and presses the brake until the brake actually takes effect.
- The free running distance is the distance the car travels from when the driver senses danger and presses the brake until the brake actually takes effect.
- The braking time is the time from when the brake begins to take effect until the car stops.
- The braking distance is the distance the car travels from when the brake begins to take effect until the car stops.
The free running distance depends on the driver's reaction speed, and the braking distance depends on the coefficient of kinetic friction between the tires and the road surface.
The gravitational acceleration of the Earth is taken to be $10~[{\rm m}/{\rm s}^2]$.
Problem Statement
In general, when the speed of the car at the moment of recognizing an obstacle is $v$ $[{\rm m}/{\rm s}]$, the free running time is $t~[{\rm s}]$, and the coefficient of kinetic friction between the tires and the road surface is $m$, letting $S(v,t,m):=\left(vt+\dfrac{v^2}{20m} \right)$, the stopping distance is $S(v,t,m)~[{\rm m}]$.
If the obstacle was $l~[{\rm m}]$ ahead at the moment it was recognized, then the car does not collide with the obstacle if $S(v,t,m) \leq l$, and the car collides with the obstacle if $S(v,t,m) \gt l$.
Now, at some point, a driver recognized an obstacle $L~[{\rm m}]$ ahead, with a free running time of $T~[{\rm s}]$ and a coefficient of kinetic friction between the tires and the road surface of $\mu$, and the car did not collide with the obstacle.
Let $V$ $[{\rm km}/{\rm h}]$ be the speed per hour of the car at the moment of recognizing the obstacle. Find the maximum possible value $\widetilde{V}$ of $V$, truncate $\widetilde{V}$ at the $3$rd decimal place, and output it up to the $2$nd decimal place.
Solve this for $N$ test cases.
Here, $1~[{\rm h}]=3600~[{\rm s}], 1~[{\rm km}]=1000~[{\rm m}]$, and the motion of the car is assumed to be 1-dimensional.
Hint: Be careful with the units. Also, it can be proved that $\widetilde{V} \leq 5100$ under these constraints.
Notes
For a real number $\alpha$, the real number $\beta$ obtained by truncating at the $3$rd decimal place and below is the real number satisfying the following.
- $100 \beta$ is an integer.
- $\beta \leq \alpha \lt \beta+0.01$
It can be proved that such a real number $\beta$ exists uniquely for any real number $\alpha$.
Constraints
Input
Input is given from standard input in the following format.$N$
${\rm case}_1$
$\vdots$
${\rm case}_N$
Each test case is given in the following format.
$T$ $\mu$ $L$
Output
The output consists of $N$ lines. On line $i~(1 \leq i \leq N)$, output the answer for ${\rm case}_i$.
The answer must always be output up to the $2$nd decimal place. For example, notations such as 46, 4.6, 0.460 are not allowed.
Also, notations with extra leading $0$s such as 046.00, 00.46, and exponential notations such as 1234e-2 are not allowed.
Do not forget the newline at the end.
Sample
Sample 1
Input
6 0.75 0.70 30.00 0.75 0.15 30.00 0.65 0.50 10.50 2.30 0.30 0.30 0.01 99.99 999.99 99.99 0.01 0.01
Output
57.26 30.34 27.00 0.46 5055.01 0.00
- [Test case 1] The average free running time is $0.75~[{\rm s}]$, and the coefficient of kinetic friction between a dry road surface and ordinary tires is $0.70$. The maximum speed $\widetilde{V}~[{\rm km}/{\rm h}]$ at which the car does not collide with an obstacle $30.00~[{\rm m}]$ ahead is $\widetilde{V}=57.2604\cdots$. Truncating $\widetilde{V}$ at the $3$rd decimal place gives $57.26$.
- [Test case 2] On the other hand, the coefficient of kinetic friction between a snow-covered road surface and ordinary tires is $0.15$. In this case, even with the same distance to the obstacle, the maximum speed that avoids a collision decreases greatly.
- [Test case 3] $\widetilde{V}=27$. Here, outputs such as
27,27.0,27.000are equal in value, but are not allowed because they violate the requirement of output up to the $2$nd decimal place. - [Test case 4] Since $\widetilde{V}=0.4652\cdots$, truncating at the $3$rd decimal place gives $0.46$. Here, outputs such as
00.46,.46are not accepted. Also, no matter how large or small the answer is, you must still output up to the $2$nd decimal place. - [Test case 5] Under the constraints of this problem, this input maximizes $\widetilde{V}$.
- [Test case 6] $\widetilde{V}=0.00036\cdots$. Be careful not to output
0.
Incidentally, the legal speed limit on roads without speed limit signs is $60~[{\rm km}/{\rm h}]$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。