All submissions for this problem are available.
The fourth years pass out and plan a get together to farewell each other for the last time. After the party, however, it will be late, and the students would reach home pretty late and will be too tired to walk a long way home. In particular, every student 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 students' houses as possible. Your job is to determine the optimal location for the party, so that as many students as possible will be willing to attend it.
We consider the city to be a flat square, 50 km on each side. A student 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 students. Each coordinate is between 0.0 and 50.0 (km). Each house is at a distinct location. There are at most 200 contestants.Your input ends with ( -1 -1 ).
Standard output consists of a single integer: the maximum number of students 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 -1 -1 Output: 4
|Time Limit:||2 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.