#P3217. [HNOI2011] 数矩形
[HNOI2011] 数矩形
Description
A certain singer is planning a world tour. He represents each city he likes as a point on the plane and plans to select cities as the tour stops.
To be unique, he requires that there exists a rectangle such that the selected points are exactly the vertices of this rectangle, and he wants the area of this rectangle to be as large as possible.
This worries his agent, so he asks fans worldwide for solutions. Of course, you will not miss this opportunity.
Input Format
The first line contains a positive integer , the number of points on the plane (i.e., the number of cities the singer likes). The next lines each contain two integers and , separated by a space, representing the coordinates of a city.
Output Format
Output a single non-negative integer, the maximum area of such a rectangle.
8
-2 3
-2 -1
0 3
0 -1
1 -1
2 1
-3 1
-2 1
10
Hint
- 20% of the testdata satisfies .
- 100% of the testdata satisfies , .
- The input guarantees that an answer exists.
Translated by ChatGPT 5
京公网安备 11011102002149号