|
||||||||||
Largest TriangleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 440 Accepted Submission(s): 234 Problem 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
Sample Output
Author hhanger@zju Source | ||||||||||
|