Problem F
Smallest Bounding Rectangle
Input: standard input
Output: standard output
Time Limit: 3 seconds
Given the Cartesian coordinates of n (> 0) 2-dimensional points, write a program that computes the area of their smallest bounding rectangle (smallest rectangle containing all the given points).
Input
The input file may contain multiple test cases.
Each test case begins with a line containing a positive integer n
(< 1001) indicating the number of points in this test case. Then follows n
lines each containing two real numbers giving respectively the x- and y-coordinates
of a point. The input terminates with a test case containing a value
0 for n which must not be processed.
Output
For each test case in the input print a line containing the area of the smallest bounding rectangle rounded to the 4th digit after the decimal point.
Sample Input
3Sample Output
80.0000
“The art of mathematics, as of life, is knowing which truths are useless.”