当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2235:Triangularize the Convex Hull

题目描述
Given N points (we call them initial points) in a plane, there may be several ways to triangularize the convex hull of these points. Here the convex hull of a set Q of points is the smallest convex polygon P for which each point in Q is either on the boundary of P or in its interior. To triangularize the convex hull means to split the convex hull into several triangles. The triangles should meet the following request:
1. The vertices of the triangles are the N initial points.
2. On an edge of a triangle (not including the tops of the edge), there won't be any initial points.
3. No two triangles overlap with each other, i.e. the area of all the triangles is equal to the area of the convex hull.

The following figure is a example of triangularizing the convex hull of the initial points. It's easy to know that there may be many different ways to triangularize the convex hull and number of triangles, which are split out by an arbitrary triangulation, is fixed. If a triangulation split the convex hull into M triangles, we may get 3*M angles (because every triangle contains 3 angles). Your job is to find a triangulation such that the minimum angle among the 3*M angles of the triangulation is not smaller than the minimum angle of any triangulation else.

You may assume that all the points cannot be in a straight line, and no two points can be at the same position.
输入解释
The input contains several test cases. In each case, the first line contains an integer N (3<= N <= 100). Then come N line, in each line there are two integers Xi and Yi (0 <= Xi, Yi < 100), which is the coordinates of an initial point.
输出解释
For each case, output a float number, which is rounded to two digits after the decimal point, in a single line. The float number is the size of minimum angle of the triangulation that you are ask to get.
输入样例
9
0 0
0 1
0 2
1 0
1 1
1 2
2 0
2 1
2 2
3
1 1
1 0
0 1
4
0 0
5 1
0 1
1 2
输出样例
45.00
45.00
18.43

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 POJ Monthly,kicc

源链接: POJ-2235

最后修改于 2020-10-29T06:27:15+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000 65536