10097_RadioCoverage

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

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

Pro.ID

10097

Title

Radio Coverage

Title链接

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

AC

1

Submit

1

Ratio

100.00%

时间&空间限制

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

    Radio station 'ACM Rock' is broadcasting over the circular area with center in point (x0, y0) and radius R. In order to increase the auditorium, it were suggested to build several relay stations. N locations were selected as candidate sites for relay stations. Relay station placed in i-th location will cover a circular area with center in point (xi, yi) and radius ri, where center lies inside the area covered by the base station, (x0 - xi)2 + (y0 - yi)2R2.

    Your task is to select a subset of sites for relay stations so that:

    1. the covered areas for relays do not intersect (but may touch) one another,

    2. the total area covered by base station and all relays is maximum possible.

    输入

    Input contains integer number N followed by real numbers x0  y0  R, followed by N triples of real numbers xi  yi  ri.

    1 ≤ N ≤ 10,   0 ≤ xi, yi, x0, y0 ≤ 1000,   1 ≤ riR ≤ 1000.

    输出

    Description

    Radio station 'ACM Rock' is broadcasting over the circular area with center in point (x0, y0) and radius R. In order to increase the auditorium, it were suggested to build several relay stations. N locations were selected as candidate sites for relay stations. Relay station placed in i-th location will cover a circular area with center in point (xi, yi) and radius ri, where center lies inside the area covered by the base station, (x0 - xi)2 + (y0 - yi)2R2.

    Your task is to select a subset of sites for relay stations so that:

    1. the covered areas for relays do not intersect (but may touch) one another,

    2. the total area covered by base station and all relays is maximum possible.

    Input

    Input contains integer number N followed by real numbers x0  y0  R, followed by N triples of real numbers xi  yi  ri.

    1 ≤ N ≤ 10,   0 ≤ xi, yi, x0, y0 ≤ 1000,   1 ≤ riR ≤ 1000.

    Output

    Output should contain a single real number --- the maximal coverage area with the absolute error less than 10-2.

    Sample Input

    1 0 0 10
    10 0 10

    Sample Output

    505.4816

    Source

    样例输入

    1 0 0 10
    10 0 10

    样例输出

    505.4816

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部