1638 - Where to make the Final Celebration

Created by 2011 Waterloo Local Contest - Ondřej Lhoták
Added by ymondelo20 (2011-11-26)
Limits
Total Time: 20000 MS | Test Time: 2500 MS |Memory: 62 MB | Output: 64 MB | Size: 29 KB
Enabled languages
Available in

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 contestant's 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).
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 contestant's 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).
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 contestant's 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 specification

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. You must read until you reach the end of file.
;jsessionid=BE263A78B51B376E04115F15F3072DDD
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. You must read until you reach the end of file.
;jsessionid=BE263A78B51B376E04115F15F3072DDD
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. You must read until you reach the end of file.
;jsessionid=BE263A78B51B376E04115F15F3072DDD

Output specification

Output consists of a single integer: the maximum number of contestants that can attend the party.
Output consists of a single integer: the maximum number of contestants that can attend the party.
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. You must read until you reach the end of file.
;jsessionid=BE263A78B51B376E04115F15F3072DDD

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

Hint(s)

http://coj.uci.cu/contest/
http://coj.uci.cu/contest/
http://coj.uci.cu/contest/