A :: Coverage
Time Limit: 1 Second Memory Limit: 32768 KB
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.
Input
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.
Output
For each case, output the answer in a line, keep 1 digit after the decimal point.
Sample Input
2 3 1 1 2 2 3 3 3 1 2 4 1 2 5
Sample Output
4.5 10.0Submit