MTRIAREA - Maximum Triangle Area

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.


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 xi and yi, indicating the ith 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 ≤ xi, yi ≤ 10^4 for all i = 1 . . . n.

Sample Input
3 4
2 6
2 7
2 6
3 9
2 0
8 0
6 5


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.

Sample output

Được gửi lên bởi:psetter
Thời gian chạy:1s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:Tất cả ngoại trừ: ERL GOSU JS-RHINO PERL6 PYPY RUST SED
Nguồn bài:Pre Shanghai 2004

hide comments
2019-10-13 13:34:22
n ^ 3 cx AC. Ez
2019-09-09 14:07:55
1 đấm trâu cũng AC. Ez
-Nhật Huy-
2017-06-17 17:20:33
trâu cũng AC
© All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.