21297_PartyLocation

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

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

Pro.ID

21297

Title

Party Location

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

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

    After the programming contest, all of the contestants would like to throw a party. After the party, however, it will be late, and the contestants will be too tired to walk a long way home. In particular, each contestant refuses to come to the party if it is more than 2.5 km from his or her house.

    The solution is to hold the party as close to as many of the contestants' houses as possible. This is where you come in: your job is to determine the optimal location for the party, so that as many contestants as possible will be willing to attend it.

    We consider the city to be a flat square, 50 km on each side. A contestant can walk directly from the party in a straight line to his or her house (there are no obstacles).

    输入

    Standard input consists of a number of lines, each containing two floating point numbers indicating the (x,y) coordinates of the house of one of the contestants. Each coordinate is between 0.0 and 50.0 (km). Each house is at a distinct location. There are at most 200 contestants.

    输出

    Description

    After the programming contest, all of the contestants would like to throw a party. After the party, however, it will be late, and the contestants will be too tired to walk a long way home. In particular, each contestant refuses to come to the party if it is more than 2.5 km from his or her house.

    The solution is to hold the party as close to as many of the contestants' houses as possible. This is where you come in: your job is to determine the optimal location for the party, so that as many contestants as possible will be willing to attend it.

    We consider the city to be a flat square, 50 km on each side. A contestant can walk directly from the party in a straight line to his or her house (there are no obstacles).

    Input

    Standard input consists of a number of lines, each containing two floating point numbers indicating the (x,y) coordinates of the house of one of the contestants. Each coordinate is between 0.0 and 50.0 (km). Each house is at a distinct location. There are at most 200 contestants.

    Output

    Standard output consists of a single integer: the maximum number of contestants that can attend the party.

    Sample Input

    4.0 4.0
    4.0 5.0
    5.0 6.0
    1.0 20.0
    1.0 21.0
    1.0 22.0
    1.0 25.0
    1.0 26.0

    Sample Output

    4

    Source

    样例输入

    4.0 4.0
    4.0 5.0
    5.0 6.0
    1.0 20.0
    1.0 21.0
    1.0 22.0
    1.0 25.0
    1.0 26.0

    样例输出

    4

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部