Poj 1279 Art Gallery
来源:互联网 发布:知乎取代百度知道 编辑:程序博客网 时间:2024/05/24 05:20
Art Gallery
This problem will be judged on PKU. Original ID: 1279
64-bit integer IO format: %lld Java class name: Main
64-bit integer IO format: %lld Java class name: Main
The art galleries of the new and very futuristic building of the Center for Balkan Cooperation have the form of polygons (not necessarily convex). When a big exhibition is organized, watching over all of the pictures is a big security concern. Your task is that for a given gallery to write a program which finds the surface of the area of the floor, from which each point on the walls of the gallery is visible. On the figure 1. a map of a gallery is given in some co-ordinate system. The area wanted is shaded on the figure 2.
Input
The number of tasks T that your program have to solve will be on the first row of the input file. Input data for each task start with an integer N, 5 <= N <= 1500. Each of the next N rows of the input will contain the co-ordinates of a vertex of the polygon ? two integers that fit in 16-bit integer type, separated by a single space. Following the row with the co-ordinates of the last vertex for the task comes the line with the number of vertices for the next test and so on.
Output
For each test you must write on one line the required surface - a number with exactly two digits after the decimal point (the number should be rounded to the second digit after the decimal point).
Sample Input
170 04 44 79 713 -18 -64 -4
Sample Output
80.00
Source
Southeastern Europe 2002
有坑,
首先这些点是顺时针的,那么我读入这些点之后就要逆置一下,
然后不能排序
第一个半平面交(O(n^2))
代码:
首先这些点是顺时针的,那么我读入这些点之后就要逆置一下,
然后不能排序
第一个半平面交(O(n^2))
代码:
0 0
- POJ 1279 Art Gallery
- poj 1279 Art Gallery
- poj 1279 Art Gallery
- POJ 1279 Art Gallery
- POJ 1279 Art Gallery
- POJ 1279 Art Gallery
- poj-1279 Art Gallery
- POJ 1279 Art Gallery .
- POJ 1279 Art Gallery
- Poj 1279 Art Gallery
- POJ 1279 Art Gallery 题解
- POJ 1279 Art Gallery(半平面交)
- Poj 1279 Art Gallery (多边形求核)
- POJ 1279 Art Gallery 多边形内核面积
- poj 1279 Art Gallery
- poj 1279 Art Gallery
- poj 1279 Art Gallery 半平面交
- [POJ 1279]Art Gallery:半平面交
- SpringBoot中Redis的set、map、list、value、实体类等基本操作介绍
- JSON由字符串到JSON对象
- PHP学习总结(9)——PHP入门篇之WAMPServer服务控制面板介绍
- Ubuntu下安装komodo
- DDOS压力测试
- Poj 1279 Art Gallery
- iOS开发-选择城市
- Opencv之Mat操作(重要)
- 芒果iOS开发之Swift教程05-Swift字符串和字符
- IMX6(D-CHIP)开发板使用步骤说明
- 常见字符串函数内部实现方法
- 别说世界和你无所谓
- iOS在图片上添加文字或图片
- PHP学习总结(10)——PHP入门篇之自定义网站根目录