Problem B
Bikes and Barricades
Scott wants to ride his bike along a straight road. But the road has some barricades! Scott will ride his bike up to the first barricade and stop.
Model Scott’s straight road as the positive
Input
The first line of input contains a single integer
Each of the next
Output
Output a single real number, which is how far Scott can ride
before he hits the closest barricade, or
Sample Input 1 | Sample Output 1 |
---|---|
2 -10 7 5 19 -1 -1 8 21 |
1.4444444444444446 |
Sample Input 2 | Sample Output 2 |
---|---|
2 4 -6 -12 -1 3 5 8 8 |
-1.0 |