Problem E
Airline Hub
Input: standard input
Output: standard output
Time Limit: 2 seconds
Memory Limit: 32 MB
World Wide Flyer (WWF) has landing rights at several airports throughout the world. They wish
to place their central hub at the airport that minimizes the maximum direct
flying distance from the hub to any other airport in the world.
Input
Input file contains
several sets of input. Each set consists of a line containing n <= 1000, the number of airports. n lines
follow, each giving the latitude (between -90 and +90 degrees)
and longitude (between -180 and +180 degrees)
of an airport. The input floating point numbers will not have more than two
digits after the decimal point. Input is terminated by end of file.
Output
For each set of input print the
latitude and longitude of the airport that best serves as a hub in a single
line. If there is more than one airport that best serves as a hub print the one
that appears last in the input of the corresponding input set. Your output
should always contain two digits after the decimal point.
Sample Input
3
3.2 -15.0
20.1 -175
-30.2 10
3
3.2 -15.0
20.1 -175
-30.2 10
Sample
Output
3.20 -15.00
3.20 -15.00
(The Decider Contest, Source: Waterloo ACM Programming Contest)