- 9
- 0
- 约8.88千字
- 约 8页
- 2020-09-13 发布于江苏
- 举报
判断点是否在多边形内(凸包和任意多边形分类讨论)
/*
POJ 1548:判断是否为凸包,判断点(圆是否在凸包内),其中判定点是否在多边形内是主要
部分
Sample Input
5 1.5 1.5 2.0
1.0 1.0
2.0 2.0
1.75 2.0
1.0 3.0
0.0 2.0
5 1.5 1.5 2.0
1.0 1.0
2.0 2.0
1.75 2.5
1.0 3.0
0.0 2.0
1
Sample Output
HOLE IS ILL-FORMED
PEG WILL NOT FIT
*/
//法 1、2 :叉积判定、面积法判定(适用于凸包)。
#includeiostream
#includecstdio
#includecstring
#includestring
#includecmath
#includecstdlib
#includequeue
#includestack
#includemap
#includevector
#includealgorithm
using namespace std;
#define maxn 10005
#define eps 1e-8
#define max(x,y) (xy?x:y)
#de
原创力文档

文档评论(0)