Preparando MOJI

Points in triangle

2000ms 262144K

Description:

You are given a set of points on a plane with positive integer coordinates. Find a triangle of minimum area with vertices in points (0, 0), (A, 0) and (0, B) (A and B are unknown positive integers) that contains all the given points inside it (points on the edges count towards being inside).

Input:

The first line of the input contains an integer N (1 ≤ N ≤ 100) — the number of points. The following N lines contain pairs of numbers X and Y (1 ≤ X, Y ≤ 100) - the coordinates of the points. All points are distinct.

Output:

Output one floating-point number — the minimal area of the triangle. The answer is considered to be correct if its absolute or relative error does not exceed 10 - 4.

Sample Input:

2
1 1
1 3

Sample Output:

6.0

Sample Input:

2
2 1
1 2

Sample Output:

4.5

Informação

Codeforces

Provedor Codeforces

Código CF530H

Tags

*specialgeometry

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:57:20

Relacionados

Nada ainda