
79  The 6th Zhejiang Provincial Collegiate Programming Contest  G
The government is making strenuous efforts to reforest the hill. To trace the growing status of the trees, an observer is placed in the middle of the area at the coordinate (0, 0). To simplify our model, let us assume that: What we are interested in here is that when the observer will lose sight on the skyline. Or we put it in the words that the observer could not see anything outside the forest in any horizontal directions. Input The first line of the input contains an integer T, T < 150, which is the number of test cases. Output For each test case, output the time that the observer would lose the sight of the sky. The answer be accurate up to six decimal places. If the observer will never be blocked by the trees, you should output "1.0" instead. Sample Input 2 2 0 1 0 2 3 1 0 0 1 0 1 Sample Output 2.000000 1.0 Author: GAO, Fei Source: The 6th Zhejiang Provincial Collegiate Programming Contest 