Square
Practice
4.2 (15 votes)
Hard
Problem
72% Success 564 Attempts 50 Points 2s Time Limit 256MB Memory 1024 KB Max Code
The problem statement is very simple.
There are N points on the plane. What is the minimal possible side of the square that it's possible to cover all the points with this square?
Note than square sides don't have to be parallel to coordinate axes.
Input
The first line contains one integer N denoting the number of points.
The following N lines contain 2 space-separated real numbers with no more than 4 digits after decimal dot - coordinates of the corresponding point.
No two points coincide.
Output
Output one real number with exactly 4 digits after decimal dot - the length of the minimal possible side.
Constraints
- 2 <= N <= 1000
- coordinates don't exceed 1000 by absolute value.
Subtasks
- N <= 30 in 40% of te test data
- N <= 200 in 53% of te test data
- N <= 500 in 76% of te test data
Submissions
Please login to view your submissions
Similar Problems
Points:50
10 votes
Tags:
AlgorithmsMathNumber TheoryNumber theoryPrime Factorization
Points:30
3 votes
Tags:
MathematicsApprovedSimple-mathEasy-MediumMathematicsMathamatics
Points:30
10 votes
Tags:
Ad-HocMathematicsEasy-MediumGame Theory
Editorial