oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

farthestpair Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

farthestpair.html

Kang the Penguin is playing a new game today! Since the algorithm to find the closest pair of points in a set of points on the euclidean plane is well known, he has decided to try something different. Thus, he wants you to find the farthest pair of points instead! Given N points, print out the distance between the farthest pair of points, rounded to 2 decimal places.

Input

On the first line of input is a single integer N (3 ≤ N ≤ 100,000)

On the next N lines of input are two integers X and Y, each representing one point in the set. (-10,000 ≤ X, Y ≤ 10,000)

Output

Print out a single floating-point number F to 2 decimal places, the farthest distance between any pair of points in the set.

Sample Input

3
0 0
1 1
2 2

Sample Output

2.83

Tags

Computational Geometry

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100201s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o farthestpair -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.