Logo
(追記) (追記ここまで)

32575번 - Fishception 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB33121135.484%

문제

A farmer marked a large rectangle on his field using four stakes hammered into the ground at the corners. The rectangle had a non-zero area. His plan was to dig a pond for pike there.

Unfortunately, the next morning, he found out that a new law on the minimum size of the living space for pike was being proposed. He decided to prepare for the new conditions. He pulled the stakes out of the ground and hammered them in at new positions. Because he wanted to use all the already prepared land, he made sure that the previous rectangle was entirely contained within the new, larger one. He was so meticulous, that no point on the boundary of the new rectangle coincided with a point on the boundary of the previous rectangle.

As it often happens, the next morning, he learned that the minimum size of the living space for pike would be even larger than what had been discussed the previous day. So, he repeated the process, pulled the stakes out, and hammered them in at new positions, only to find out the next day that the space needed to be expanded again. This repeated for several days.

Finally, when the time to vote came, the proposed law was unanimously rejected. The farmer then decided to return to the original marked area. He pulled out the stakes, thinking he would simply place them back into the holes left by the stakes. However, he suddenly realized that his entire field was now full of holes from all the constant stake-shifting, and he no longer knew which four points represented the original rectangle. To make matters worse, he received a call from the Land Management Office, urgently requesting the area of the land he planned to use for the pond.

We know the coordinates of all the holes left by the stakes. Help the farmer determine the area of the original, smallest rectangle.

입력

The first input line contains one integer $N$ (4ドル ≤ N ≤ 2 \cdot 10^5$), the number of stakes. $N$ is always a multiple of 4ドル$. Each of the next $N$ lines contains two integers $x$ and $y$ ($-10^9 ≤ x, y ≤ 10^9$), specifying the coordinates of one stake. No two stakes share the same coordinates.

출력

Output one integer specifying the area of the rectangle marked on the first day of the farmer’s efforts.

제한

예제 입력 1

16
0 1
1 0
-1 0
0 -1
2 2
-2 2
2 -2
-2 -2
0 6
0 -6
6 0
-6 0
7 7
-7 7
-7 -7
7 -7

예제 출력 1

2

예제 입력 2

16
-3 7
-2 6
-1 5
0 4
0 3
-1 2
-2 1
-3 0
3 3
3 4
6 2
6 5
9 1
9 6
12 0
12 7

예제 출력 2

3

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CTU Open Contest > CTU Open Contest 2024 F번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /