Problem E
Curve Speed
To help with vehicle stability, the outer edge of a road in a curve is raised with respect to the inner edge. This is called superelevation and is specified as the difference in elevation divided by the width of the road. It needs to be higher for faster speeds and sharper curves.
The radius of a curve is the radius of the section of a circle along the middle of the road where the curve is constant. See Figure 1 for a drawing of this.
![\includegraphics[width=.65\textwidth ]{F1CurveSpeed.pdf}](/problems/curvespeed/file/statement/en/img-0001.png)
In some cases the curve may need a lower speed limit than
straight portions of the road. The superelevation shouldn’t be
more than about
Your job is to calculate the maximum speed on a curve given the radius of the curve and the superelevation.
The maximum speed is given by this formula:
where
Input
The input is a series of lines terminated by end-of-file.
Each line will be a test case consisting of
Output
For each test case output the maximum speed rounded to the
nearest integer. It is guaranteed the answer before rounding
will not be within
Sample Input 1 | Sample Output 1 |
---|---|
1433 .09 1433 .12 2000 .09 600 .12 |
73 77 86 50 |