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

29944번 - Art Exhibition 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB3410724.138%

문제

Once a year contestants from multiple countries gather to compete in the Best Olympiad in Informatics. Besides the competition, guests have an opportunity to visit local museums and landmarks. This year there will be an art exhibition specially made for the contestants and to appeal to such an audience every picture will be a collection of points with integer coordinates.

The coordinates of the points in every picture are already decided on and what's left is to print the pictures out. However, printing them on normal rectangular canvas is wasteful as a large part of the paper might not containt any points at all. To make the exhibition more eco-friendly, every canvas shall be a four-sided polygon with the top and bottom sides completely horizontal. The canvas must contain all points, but at the same time it must be as small as possible.

Your job is to write a program that outputs the minimum possible area of the canvas. Note that any side of the canvas can be infinitely small, making the canvas look like a triangle, line or even a point (in the last two cases the area is zero).

입력

The first line of input contains the number of points $N$ (1ドル \le N \le 10^5$). The next $N$ lines contain two numbers each: the coordinates $x_i$ and $y_i$ of point $i,ドル in picometers ($-10^8 \le x_i, y_i \le 10^8$).

출력

On the only line of ouput, output the minimum possible area of the canvas. Your answer will be considered correct if it doesn't differ from the true answer by more than 0ドル.0001\%$.

제한

예제 입력 1

6
0 3
1 1
4 1
3 0
3 2
0 0

예제 출력 1

10.5

In the first test, the bottom side is 5ドル,ドル top is 2ドル$ and the height is 3ドル,ドル hence the area is $\frac{3}{2}(5+3) = 10.5$.

예제 입력 2

1
20 18

예제 출력 2

0

As the second test contains only one point the canvas can be arbitrary small and so the answer is zero.

힌트

출처

Olympiad > Estonian Informatics Olympiad > 2018-19 > Preliminary Round 5번

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

출처

대학교 대회

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

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