Author: | T. Chistyakov, A. Klenin | |||
Input file: | input.txt | Time limit: | 2 sec | |
Output file: | output.txt | Memory limit: | 24 Mb |
You need to divide a non-degenerate convex polygon with a horizontal line into two parts of equal area.
The polygon is specified by N vertices in the clockwise order.
3 ≤ N ≤ 1000000
1 ≤ xi, yi ≤ 1000000
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
Author: | T. Chistyakov, A. Klenin | |||
Input file: | input.txt | Time limit: | 3 sec | |
Output file: | output.txt | Memory limit: | 64 Mb |
There are N points on a plane. Convex hull is such a convex polygon with the least possible area, that all the given points are either within its interior or belong to its border.
Let's say that one convex polygon is smoother that the other one if it's sharpest angle is more obtuse than the sharpest angle of the other one.
Your task is to make the convex hull of the given set of points as smooth as possible. To do it you are allowed to exclude no more than one point from the given set.
Output file must contain a single number: the sharpest angle (in radians) in the most smooth convex hull with absolute error less than 0.01.
3 ≤ N ≤ 1000
1 ≤ xi, yi ≤ 106
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|
Автор: | Зимние сборы 2005 | |||
Входной файл: | best.in | Ограничение времени: | 2 сек | |
Выходной файл: | best.out | Ограничение памяти: | 64 Мб |
Нередко при решении статистических задач требуется найти прямую, расположенную в некотором смысле посередине данного набора точек. В этой задаче требуется минимизировать сумму квадратов расстояний от точек данного набора до прямой.
№ | Входной файл (best.in ) |
Выходной файл (best.out ) |
---|---|---|
1 |
|
|