Triangle
Very hard
Execution time limit is 3 seconds
Runtime memory usage limit is 64 megabytes
Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points.
Input
The input consists of several test cases. The first line of each test case contains an integer n, indicating the number of points on the plane. Each of the following n lines contains two integer x_i and y_i, indicating the i_th points. The last line of the input is an integer -1, indicating the end of input, which should not be processed. You may assume that 1 ≤ n ≤ 50000 and -10^4 ≤ x_i, y_i ≤ 10^4 for all i = 1...n.
Output
For each test case, print a line containing the maximum area, which contains two digits after the decimal point. You may assume that there is always an answer which is greater than zero.
Examples
Input #1
Answer #1
Submissions 457