Circle Containing All Points
Time limit2sMemory limit512 MB
Given N points, find the diameter of the smallest enclosing circle, printed to two decimals.
- Level
Medium6 of 10
- Topics
- Geometry, Brute force
- Solved
- No attempts yet
Problem
You are given points on a 2D plane. Write a program that finds the diameter of the smallest circle that contains all of the points.
A point that lies on the circumference of the circle counts as contained in the circle.
Input
The first line contains the number of points ().
Each of the next lines contains the coordinates and of one point, separated by a space ().
Output
Print the minimum diameter of a circle that contains all the points, rounded to two decimal places.