Pro.ID22194 TitlePost Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22194 AC0 Submit0 Ratio- 时间&空间限制描述We have a warehouse, which is H feet height and W feet width, with solid north and south walls. The east and west walls have sliding doors which allow trucks free entry and exit. We want to drive big trucks in a straight line into the warehouse through the west wall and (after unloading and without changing direction) out through the east wall. Unfortunately the roof is supported by posts. Take the positions and sizes of the posts as inputs and output the width of the widest truck that can drive straight through without touching any posts (or the north or south wall). 输入The first line contains three integers n, W, H. 1 ≤ n ≤ 30, 1 ≤ W, H ≤ 10000. The following n lines describe n posts. Each contains three real numbers x, y, r. 0 < x < W, 0 < y < H, 0 < r. The posts do not intersect with each other (or the walls). 输出Description We have a warehouse, which is H feet height and W feet width, with solid north and south walls. The east and west walls have sliding doors which allow trucks free entry and exit. We want to drive big trucks in a straight line into the warehouse through the west wall and (after unloading and without changing direction) out through the east wall. Unfortunately the roof is supported by posts. Take the positions and sizes of the posts as inputs and output the width of the widest truck that can drive straight through without touching any posts (or the north or south wall). Input The first line contains three integers n, W, H. 1 ≤ n ≤ 30, 1 ≤ W, H ≤ 10000. The following n lines describe n posts. Each contains three real numbers x, y, r. 0 < x < W, 0 < y < H, 0 < r. The posts do not intersect with each other (or the walls). Output For each ease, output a line contains a real number with precision up to two decimal places. Sample Input 2 100 100 Sample Output 35.00 Source 样例输入2 100 100 样例输出35.00 作者 |