78 - ZOJ Monthly, May 2009 - B
Given n points (xi, yi) (i = 1, 2 ... n) in a plane, where all xi will be distinct. After connecting the n points with staight lines in order from the leftmost point to the rightmost point, the area below the lines is called coverage. Now, it's your job to calculate the maximum coverage area, if yi (i = 1, 2 ... n) can be swapped arbitrarily.
The first line of the input is an integer t (t <= 100), indicate the number of cases.
Each case starts with one integer n (2 <= n <= 1000) in a line. Then follows n lines, each consists of two integers x y (1 <= x, y <= 105) representing a point.
Cases are separated by one blank line.
For each case, output the answer in a line, keep 1 digit after the decimal point.
2 3 1 1 2 2 3 3 3 1 2 4 1 2 5
Author: GAO, Yuan
Source: ZOJ Monthly, May 2009