POJ1474:Video Surveillance(求多边形的核)(占位)
The first problem is to choose where to install the camera for every floor. The only requirement is that every part of the room must be visible from there. In the following figure the left floor can be completely surveyed from the position indicated by a dot, while for the right floor, there is no such position, the given position failing to see the lower left part of the floor.
Before trying to install the cameras, your friend first wants to know whether there is indeed a suitable position for them. He therefore asks you to write a program that, given a ground plan, de- termines whether there is a position from which the whole floor is visible. All floor ground plans form rectangular polygons, whose edges do not intersect each other and touch each other only at the corners.
Input
A zero value for n indicates the end of the input.
Output
Print a blank line after each test case.
Sample Input
4
0 0
0 1
1 1
1 0
8
0 0
0 2
1 2
1 1
2 1
2 2
3 2
3 0
0
Sample Output
Floor #1
Surveillance is possible. Floor #2
Surveillance is impossible.
题意:给定比较规则的多边形,问是否存在一点P,使得P到所有多边形上的点的路径都是在多边形内部,即是否存在核。
思路:反正是模板题,思路自己百度吧。
update:https://www.cnblogs.com/hua-dong/p/10670137.html
POJ1474:Video Surveillance(求多边形的核)(占位)的更多相关文章
- poj 1474 Video Surveillance - 求多边形有没有核
/* poj 1474 Video Surveillance - 求多边形有没有核 */ #include <stdio.h> #include<math.h> const d ...
- POJ 1279 Art Gallery【半平面交】(求多边形的核)(模板题)
<题目链接> 题目大意: 按顺时针顺序给出一个N边形,求N边形的核的面积. (多边形的核:它是平面简单多边形的核是该多边形内部的一个点集该点集中任意一点与多边形边界上一点的连线都处于这个多 ...
- poj1474 Video Surveillance
题意:求多边形的内核,即:在多边形内部找到某个点,使得从这个点能不受阻碍地看到多边形的所有位置. 只要能看到所有的边,就能看到所有的位置.那么如果我们能够在多边形的内部的点x看到某条边AB,这个点x一 ...
- POJ1474 Video Surveillance(半平面交)
求多边形核的存在性,过了这题但是过不了另一题的,不知道是模板的问题还是什么,但是这个模板还是可以过绝大部分的题的... #pragma warning(disable:4996) #include & ...
- POJ 3130 How I Mathematician Wonder What You Are!(半平面交求多边形的核)
题目链接 题意 : 给你一个多边形,问你该多边形中是否存在一个点使得该点与该多边形任意一点的连线都在多边形之内. 思路 : 与3335一样,不过要注意方向变化一下. #include <stdi ...
- How I Mathematician Wonder What You Are! - POJ 3130(求多边形的核)
题目大意:判断多多边形是否存在内核. 代码如下: #include<iostream> #include<string.h> #include<stdio.h> # ...
- poj 1474 Video Surveillance 【半平面交】
半平面交求多边形的核,注意边是顺时针给出的 //卡精致死于是换(?)了一种求半平面交的方法-- #include<iostream> #include<cstdio> #inc ...
- POJ 1279 Art Gallery 半平面交 多边形的核
题意:求多边形的核的面积 套模板即可 #include <iostream> #include <cstdio> #include <cmath> #define ...
- POJ - 1474 :Video Surveillance (半平面交-求核)
pro:顺时针给定多边形,问是否可以放一个监控,可以监控到所有地方,即问是否存在多边形的核. 此题如果两点在同一边界上(且没有被隔段),也可以相互看到. sol:求多边形是否有核.先给直线按角度排序, ...
随机推荐
- Codeforces Gym 100286J Javanese Cryptoanalysis 傻逼暴力
原题地址:http://codeforces.com/gym/100286/attachments/download/2013/20082009-acmicpc-northeastern-europe ...
- Spring 详解(二)------- AOP关键概念以及两种实现方式
目录 1. AOP 关键词 2. AOP 的作用 3. AOP 的通知类型 4. 基于 xml 的配置方式 5. 基于注解的配置方式 6. 切面的优先级 7. 重用切点表达式 8. 两种方式的比较(摘 ...
- Java ListIterator 与 Iterator 异同
一.概述 基于 fail-fast 机制,我们知道对于ArrayList等集合在迭代过程中是不可进行结构修改操作的,唯一能使用的结构修改操作只有Iterator接口中的remove()方法. 而jav ...
- Kafka windows下的安装
1. 安装JDK 1.1 安装文件:http://www.oracle.com/technetwork/java/javase/downloads/index.html 下载JDK1.2 安装完成后需 ...
- HDD磁盘,非4K无以致远
机械硬盘的未来要靠高容量作为依托,在财报中,希捷表示未来18个月内它们将推出14和16TB机械硬盘,而2020年20TB机械硬盘就将诞生.也有资料显示,3.5英寸100TB硬盘大概在2025年就能面世 ...
- Linux温习(三)Linux文件和文件夹管理
关于Linux文件夹的几个常见概念 路径 对文件位置信息的描写叙述机制.是指从树型文件夹中的某个文件夹层次到其内某个文件的一条通路.分为相对路径和绝对路径: 工作文件夹 登入系统后.用户始终处于某个文 ...
- js跳出循环的方法区别( break, continue, return ) 及 $.each 的(return true 和 return false)
js编程语法之break语句: break语句会使运行的程序立刻退出包含在最内层的循环或者退出一个switch语句. 由于它是用来退出循环或者switch语句,所以只有当它出现在这些语句时,这种形式的 ...
- C#语言循环语句for嵌套
- 关于Widget预览图的改动
在做项目时候,由于常常不带GPS功能.所以在有些细节上须要做处理,当中之中的一个就是.快捷开关的预览图和实际效果图的差异 在我们快捷开关的预览图中,总是能够看到五个快捷开关,事实上就包含GPS信息 而 ...
- linux输入子系统(6)-input子系统介绍及结构图
注:本系列转自: http://www.ourunix.org/post/290.html input子系统介绍 输入设备(如按键,键盘,触摸屏,鼠标,蜂鸣器等)是典型的字符设备,其一 ...