| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 106 | 57 | 48 | 53.933% |
You are given a set of points on a plane with integer coordinates. Find a triangle with the largest area whose vertices belong to this set of points, with one of its sides lying on the $Ox$ axis.
The first line contains an integer $n$: the number of points (1ドル \le n \le 1000$). Each of the following $n$ lines contains two integers $x$ and $y$: the coordinates of the points. All coordinates do not exceed 1000ドル$ by absolute value.
Output a single real number: the maximum area of the triangle that satisfies the problem's conditions. If there is no such triangle or it is degenerate, output 0ドル$.
Your answer will be considered correct if it differs from the exact value by no more than 10ドル^{-9}$.
3 0 0 1 0 2 -3
1.5
3 1 0 2 1 3 3
0
Pictures for the examples: