REDCROSS - Red Cross Hospital
The Red Cross is a humanitarian and neutral organization that strives to provide assistance to victims of civil wars and other situations of serious violence.
Recently, Nlogônia entered into a political crisis that culminated in a great civil war. This war wrecked Dozens of innocent communities across the country. Seeing the calamity situation in which the country joined, the Red Cross decided to help the population in all affected regions in Nlogônia.
For this, it was decided that a hospital base will be installed to support the Red Cross in the country. However, the summit do not know where to build the base of Red Cross hospital. You and your team were hired to tell the Red Cross the position that they must build the hospital, with the constraint that the distance to the farthest community from the hospital is as small as possible.
The input file consists of several test cases. For each test case, the first line contains the number of affected communities N to be served. Each of the following N lines contains a localization of each community. Localization is represented by decimal coordinates X and Y. After the first test case will be another line with a new test case defined by number of communities N. The input never contains repeated coordinates for each community in each test case and the input ends with N=0.
For each test case of your program prints just a one line with two decimal number separated by
commas indicating the optimum location for the construction of the base hospital, regardless of the
area have a built space. Each coordinate must be printed with four decimal place of accuracy.
Output: 0.0000, 0.0000
|Added by:||Diogo Soares [UFAM]|
|Cluster:||Cube (Intel Pentium G860 3GHz)|
I 'm getting WA again and again.. What could be possible reason? logic is correct and sample input is giving correct output.. plz clarify about the space/comma thing
Diogo Soares [UFAM]:
yes! There is a space after comma
is there a space after , in output?
Last edit: 2012-06-11 18:14:53
Last edit: 2012-06-12 05:30:42