Shamans
Time Limit: 10 Seconds Memory Limit: 32768 KB
In the far bare land there lives a mysterious tribe. They suffer from drought every year but they stick to their faith in god that they will never leave their home land. To counter the dry weather the shamans in the tribe must pray during the hard time and hope the rain will be blessed for their production of food.
There are 4 chief shamans in the tribe and they each will choose a summit in the territory to proceed their praying. The area their spells taking effect will be the polygon they form, taking each of them a vertex of the polygon (as the god will see when he looks down from the high heavens). The land is quite full of pinch and punch and the tribe has recorded quite some peaks for the shamans to pray on. Of course a largest area is expected so before the shamans actually go out, they will choose 4 peaks among the many to achieve so.
Input
One integer in the first line, followed by a blank line, stating the number of test cases. There will be not more than 300 tests.
For each test case, the first line is an integer n (4 <= n <= 2000) will state the number of peaks. Then n lines follow each presents the position of a peak, with two integers x, y (-20000 <= x, y <= 20000).
The test cases will be separated by a single blank line.
Output
A floating point number with exactly 1 digit precision: maximum area the shamans can cover.
Sample Input
2 4 0 0 1 0 1 1 0 1 4 0 0 0 1 1 1 1 0
Sample Output
1.0 1.0Submit
Source: ZOJ Monthly, December 2004