22230_Meltdown

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

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

Pro.ID

22230

Title

Meltdown

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

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

    A polygon is lowered at a constant speed of v metres per minute from the air into a liquid that dissolves it at a constant speed of c metres per minute from all sides. Given a point (x, y) inside the polygon that moves with the polygon, determine when the liquid reaches the point.

    The border between air and liquid always has y-coordinate 0, and the liquid only eats away from the sides of the polygon in 2 dimensions. The polygon does not rotate as it is lowered into the liquid, and at time 0, it is not touching the liquid.

    Unlike the polygon, which is flat (2-dimensional), the liquid exists in three dimensions. Therefore, the liquid seeps into cavities in the polygon. For example, if the polygon is "cup-shaped", the liquid can get "inside" the cup, as in the diagram below.

    输入

    The input consists of several test cases.

    The first line of each test case contains the five integers N, x, y, v, and c, where 3 ≤ N ≤ 30, -100 ≤ x ≤ 100, 1 ≤ y ≤ 100, and 1 ≤ c < v ≤ 10.

    The following N lines of the test case each contain one vertex of the polygon. The i-th line contains the two integers x, y, where -100 ≤ x ≤ 100, 1 ≤ y ≤ 100.

    The vertices of the polygon are given in counter-clockwise order. The border of the polygon does not intersect or touch itself, and the point (x, y) lies strictly inside the polygon — it does not lie on the border of the polygon.

    Input is terminated by a line containing 0 0 0 0 0. These zeros are not a test case and should not be processed.

    输出

    Description

    A polygon is lowered at a constant speed of v metres per minute from the air into a liquid that dissolves it at a constant speed of c metres per minute from all sides. Given a point (x, y) inside the polygon that moves with the polygon, determine when the liquid reaches the point.

    The border between air and liquid always has y-coordinate 0, and the liquid only eats away from the sides of the polygon in 2 dimensions. The polygon does not rotate as it is lowered into the liquid, and at time 0, it is not touching the liquid.

    Unlike the polygon, which is flat (2-dimensional), the liquid exists in three dimensions. Therefore, the liquid seeps into cavities in the polygon. For example, if the polygon is "cup-shaped", the liquid can get "inside" the cup, as in the diagram below.

    Input

    The input consists of several test cases.

    The first line of each test case contains the five integers N, x, y, v, and c, where 3 ≤ N ≤ 30, -100 ≤ x ≤ 100, 1 ≤ y ≤ 100, and 1 ≤ c < v ≤ 10.

    The following N lines of the test case each contain one vertex of the polygon. The i-th line contains the two integers x, y, where -100 ≤ x ≤ 100, 1 ≤ y ≤ 100.

    The vertices of the polygon are given in counter-clockwise order. The border of the polygon does not intersect or touch itself, and the point (x, y) lies strictly inside the polygon — it does not lie on the border of the polygon.

    Input is terminated by a line containing 0 0 0 0 0. These zeros are not a test case and should not be processed.

    Output

    For each test case, output the first time in minutes that the liquid reaches the specified point, rounded to four decimal places.

    Sample Input

    4 0 50 2 1
    -1 10
    1 10
    1 90
    -1 90
    0 0 0 0 0

    Sample Output

    25.8660

    Source

    样例输入

    4 0 50 2 1
    -1 10
    1 10
    1 90
    -1 90
    0 0 0 0 0

    样例输出

    25.8660

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部