#C3581. Maximum Distance Between Points
Maximum Distance Between Points
Maximum Distance Between Points
Given a set of points in a 2D plane, your task is to find the maximum distance between any two points.
The distance between two points \( (x_1, y_1) \) and \( (x_2, y_2) \) is defined as:
\( d = \sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2} \)
For each test case, output the maximum distance rounded to 4 decimal places.
inputFormat
The input starts with an integer \(T\) representing the number of test cases. Each test case consists of:
- An integer \(N\) which is the number of points.
- \(N\) lines each containing two integers representing the coordinates \(x\) and \(y\) of a point.
outputFormat
For each test case, output a single line containing the maximum distance (rounded to 4 decimal places) among all pairs of points.
## sample1
3
0 0
0 3
4 0
5.0000