ACM-ICPC INC 2008 - Practice Session
Square Lookup Easy
Time Limit: 1s
Given a set S of N points in Cartesian coordinate, find the largest square that can be formed by choosing four distinct points from S.
The first line of input contains an integer T, the number of test cases follow.
Each case begins with an integer N (1 <= N <= 15). The next N following lines each consists of a pair of integers, the x and y coordinate of ith point of S in Cartesian coordinate respectively (-100 <= x, y <= 100).
For each case, output area of the largest square that can be formed by choosing four distinct points from S, rounded to two decimal points. Output "0.00" (without quote) if there are no squares can be formed.
|Sample Input||Output for Sample Input|
Source: BNPC-HS 2007 Qualification Round
Modified for INC 2008 - Practice Session