Problem F
Trick or Treat
Johnny and his friends have decided to spend Halloween night doing the usual candy collection from the households of their village. As the village is too big for a single group to collect the candy from all houses sequentially, Johnny and his friends have decided to split up so that each of them goes to a different house, collects the candy (or wreaks havoc if the residents don’t give out candy), and returns to a meeting point arranged in advance.
There are
Keeping in mind that, because of their response to the
hospitality of some villagers, some children might be wanted by
the local authorities, they have agreed to fix the meeting
point by the river running through the village, which is the
line
At exactly midnight, each child will knock on the door of the house he has chosen, collect the candy instantaneously, and walk back along the shortest route to the meeting point. Tell Johnny at what time he will be able to start eating the candy.
Input
Each test case starts with a line indicating the number n of
houses (
A blank line follows each case. A line with
Output
For each test case, print two numbers in a line separated by
a space: the coordinate
Sample Input 1 | Sample Output 1 |
---|---|
2 1.5 1.5 3 0 1 0 0 4 1 4 4 4 -3 3 2 4 5 4 7 -4 0 7 -6 -2 4 8 -5 0 |
1.500000000000 1.500000000000 0.000000000000 0.000000000000 1.000000000000 5.000000000000 3.136363636363 7.136363636364 |