#P3217. [HNOI2011] 数矩形

    ID: 2266 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 8 上传者: 标签>计算几何2011湖南枚举,暴力排序

[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 44 cities as the tour stops.

To be unique, he requires that there exists a rectangle such that the selected 44 points are exactly the 44 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 NN, the number of points on the plane (i.e., the number of cities the singer likes). The next NN lines each contain two integers XiX_i and YiY_i, 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 N500N \leq 500.
  • 100% of the testdata satisfies N1500N \leq 1500, 108Xi,Yi108-10^8 \leq X_i, Y_i \leq 10^8.
  • The input guarantees that an answer exists.

Translated by ChatGPT 5