22194_Pos

2022-5-16 18:21| 发布者: Hocassian| 查看: 28| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506190574300-Problem List-采集的数据-后羿采集器.html

Pro.ID

22194

Title

Post

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22194

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    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
    50 25 5
    50 75 10

    Sample Output

    35.00

    Source

    样例输入

    2 100 100
    50 25 5
    50 75 10

    样例输出

    35.00

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部