#P1742. Minimum Enclosing Circle

    ID: 15027 Type: Default 1000ms 256MiB

Minimum Enclosing Circle

Minimum Enclosing Circle

Given N points on the plane, find the smallest circle that encloses all the points. Mathematically, you are to determine a circle with center ( (x, y) ) and radius ( r ) such that for every point ( (x_i, y_i) ), the inequality ( (x_i - x)^2 + (y_i - y)^2 \le r^2 ) holds, and ( r ) is minimized.

inputFormat

The first line contains an integer ( N ) indicating the number of points. Each of the next ( N ) lines contains two real numbers ( x_i ) and ( y_i ) separated by spaces.

outputFormat

Output three real numbers: the ( x )-coordinate, ( y )-coordinate of the center and the radius of the minimum enclosing circle. Answers within an absolute or relative error of (10^{-6}) will be accepted.

sample

1
0 0
0.000000 0.000000 0.000000