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

建议使用的浏览器:

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

3355:Boundary Points

Special Judge 特殊评判
题目描述

The convex hull of a set of points Q on a plane is the smallest convex polygon P for which each point in Q is in the boundary or inside P.

``The problem of finding convex hulls finds its practical applications in pattern recognition, image processing, statistics and geographic information systems or GIS. It also serves as a tool, a building block for a number of other computational-geometric algorithms. For example, consider the problem of finding the diameter of a set of points, which is the pair of points a maximum distance apart. The diameter will always be the distance between two points on the convex hull.

For planar objects, i.e., lying in the plane, the convex hull may be easily visualized by imagining an elastic band stretched open to encompass the given objects; when released, it will assume the shape of the required convex hull. It may seem natural to generalise this picture to higher dimensions by imagining the objects enveloped in a sort of idealized unpressurized elastic membrane or balloon under tension. However, the equilibrium (minimum-energy) surface in this case may not be the convex hull-parts of the resulting surface may have negative curvature, like a saddle surface. For the case of points in 3-dimensional space, if a rigid wire is first placed between each pair of points, then the balloon will spring back under tension to take the form of the convex hull of the points." (from Wikipedia)

Write a program that outputs the convex polygon P for a set of points Q.

输入解释

The set of points in Q (3 ≤ Q ≤ 10000) are given in one line and the program should be able to read any number of lines where each line is one set of points in Q. Each point is of the format (x, y) where x, y ∈ R.

输出解释

Each test case will be displayed in one line of output. The first point and the last point of the convex hull must match. Any sequence of points defining the convex hull will be considered valid.

输入样例
(-2,1) (-1,-2) (-1,1) (-1,2) (-1,3) (0,0) (1,-1) (1,1) (2,-2) (2,1) (3,2)
输出样例
(-1,-2) (2,-2) (3,2) (-1,3) (-2,1) (-1,-2)
提示
Output the smallest possible number of points.

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

题目来源 Manila 2006

源链接: POJ-3355

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

共提交 0

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