Square
Practice
3.7 (529 votes)
Ready
Geometry
Approved
Hard
Problem
57% Success 2040 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

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
6 votes
Tags:
Basic ProgrammingBasics of Implementation
Points:10
29 votes
Tags:
Very-Easy
Points:50
1 votes
Tags:
AlgorithmsApprovedGraphsHardKuhn munkres algorithmOpen
Editorial

No editorial available for this problem.