Largest Triangle

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 2299
64-bit integer IO format: %I64d      Java class name: Main

Description

You have a convex polygon. You select three consecutive vertices and create a triangle with them. Remove this triangle from the polygon (if you had a polygon with N vertices, the resulting polygon would have N-1 vertices). Repeat this process until the remaining polygon is a triangle.
You are given the vertices of the polygon in clockwise order. Output the largest possible triangle that can remain at the end.

Input

There are multiple cases (no more than 150).
The first line of each case is an integer n indicating the number of vertices in this polygon (3 <= n && n <= 50).
Then n lines follow, each with two integers x y (0 <= x <= 100, 0 <= y <= 100), giving the cordinate of the vertices.

Output

For each case, output the largest possible triangle that can remain at the end. Keep one digit after the decimal point.

Sample Input

3
1 1
2 3
3 2

4
1 1
1 2
3 3
2 1

Sample Output

1.5
1.5

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .