Canadian Computing Competition: 2001 Stage 2, Day 2, Problem 2
You are planning to open a new Veggie Vittles fast-food restaurant franchise. franchises are available, and you must determine the most desirable locations.
The city is a perfect square, km in linear dimension. The population density and demographics are uniform throughout the area of the city. You wish to choose your restaurant's location so that it is the Veggie Vittles that is the closest to the greatest possible fraction of the city's population.
Input Specification
The input may contain several test cases. The first line of each test case contains ; the number of Veggie Vittles to be opened. lines follow, each giving the coordinates of each restaurant; each coordinate value is an integer between and . The input ends with a 0 for the value of .
Output Specification
The output from your program consists of a list for the franchise locations. Print one line for each location, in the same order as the input, giving its coordinates followed by the percentage of the city's population for which it is the closest Veggie Vittles. Use the format given in the sample, rounding each percentage to the nearest integer. Do not worry about the details of rounding; any answer within percentage points of the correct answer will be accepted.
Sample Input
3
3 5
5 7
7 5
0
Sample Output
Restaurant at (3,5) serves 38% of the population.
Restaurant at (5,7) serves 25% of the population.
Restaurant at (7,5) serves 38% of the population.
Comments
Since the checker was wrong, the checker was updated, and all the submissions were rejudged.