409725: GYM103708 G Going to the Regional
Description
The Grand Prix of Mexico wishes to organize its next regional event in the same venue for all the participants, also this year it has a budget to help the participants to move to the venue of the event, so it wants to calculate how much transportation would cost per participant towards headquarters. They also want the process to be as comfortable and easy as possible for the participants, because they want them to stress as little as possible before the day of the regional, so each participant will be picked up at their door.
The organization in Mexico does not have enough vehicles to do this, so it has contacted a transport office to calculate the costs and they have given a cost per kilometer for each participant depending on the location of their home. The transport office ensures it can provide a vehicle for each participant and that will start the travel simultaneously for all participants to the desired venue.
The organization plans to give an equal budget to each participant for logistical reasons when making the final calculation of expenses, so given the cost per kilometer per participant and the exact location of each participant, can you help calculate the minimum cost per participant such that all participants can meet in one place?
For simplicity the distance from a participant to any other location is calculated in Euclidean distance.
InputIn the first line of input a number $$$n(1 \leq n \leq 100)$$$ the number of participants
In the next $$$n$$$ lines three integers $$$x_i(-10^4 \leq x_i \leq 10^4)$$$, $$$y_i(-10^4 \leq y_i \leq 10^4)$$$ and $$$c_i(1 \leq c_i \leq 10^4)$$$ the pair ($$$x_i$$$, $$$y_i$$$) are the coordinates of the participant $$$i$$$ and $$$c_i$$$ is the cost per kilometer that it takes to transport the participant $$$i$$$
OutputIn a single line print the minimum budget per participant the organization has to invest to take alll the participants to a single place
Your answer is considered correctly if its absolute or relative error does not exceed $$$10^{-4}$$$
Formally let your answer be $$$a$$$, and the jury's answer be $$$b$$$. Your answer is accepted if and only if $$$\frac{|a - b|}{max(1, |b|)} \leq 10^{-4}$$$
ExamplesInput2 1 1 1 -1 -1 1Output
1.414214Input
4 0 1 1 1 0 1 0 -1 1 -1 0 1Output
1.000001