luogu#P4697. [CEOI 2011] Balloons
[CEOI 2011] Balloons
Problem Description
There are balloons, and they are all empty at the beginning.
Next, they will be inflated one by one in order from to . The -th balloon touches the ground at position .
A balloon stops inflating when it touches some previous balloon, or when it reaches its maximum radius limit. The maximum radius limit of the -th balloon is .
Now, please find the final radius of each balloon.
Input Format
The first line contains a positive integer , which represents the number of balloons.
The next lines each contain two integers separated by a space.
Output Format
Output lines. Each line contains a floating-point number. The floating-point number on the -th line represents the final radius of the -th balloon.
Your answer will be judged correct if and only if the absolute error from the correct answer does not exceed .
3
0 9
8 1
13 7
9.000
1.000
4.694
Hint
For of the testdata, it is guaranteed that , , , and .
Translated by ChatGPT 5