#C13124. Drone Convergence Optimization

    ID: 42628 Type: Default 1000ms 256MiB

Drone Convergence Optimization

Drone Convergence Optimization

You are given three drones. Each drone has a starting point in 2D space and a constant speed. The ith drone is located at coordinates \((x_i, y_i)\) and has speed \(s_i\). The time it takes for a drone to reach a target point \((X, Y)\) is given by \(\frac{\sqrt{(X-x_i)^2+(Y-y_i)^2}}{s_i}\). Your task is to find an optimal convergence point \((X^*, Y^*)\) that minimizes the maximum time taken among all drones to reach that point. In other words, you need to minimize \[ T(X, Y)=\max_{i=1}^3 \frac{\sqrt{(X-x_i)^2+(Y-y_i)^2}}{s_i} \]

and output the optimal point along with the corresponding minimum maximum time.

Note: It is guaranteed that the optimal solution is unique. Use an iterative or optimization method to solve this problem.

inputFormat

The input is read from standard input. It consists of three lines. Each line contains three space-separated floating-point numbers \(x\), \(y\), and \(s\), representing the coordinates and speed of a drone.

outputFormat

Print a single line to standard output containing three floating-point numbers: the \(x\)-coordinate, the \(y\)-coordinate of the optimal convergence point, and the minimized maximum time. Each number must be printed with four decimal places.

## sample
0 0 1
1 1 1
2 2 1
1.0000 1.0000 1.4142

</p>