![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_计算几何
vvictoryuki
这个作者很懒,什么都没留下…
展开
-
计算几何之用叉乘求多边形面积
一、理论基础二维向量叉乘得到的是对应平行四边形的有向面积,所以,只要保证按照逆时针对点排序,以下的算法都是可行的:①凸多边形,选取一个A0,从A1开始依次挑选相邻的两个点,求三角形面积,求和即可②非凸多边形,同上法,由于算的是有向面积,正负抵消就可以得到面积③任意多边形,选取其边外一点A0,同上法,答案亦相同可见有向面积的定义比起纯粹的面积定义更本质二、例题codevs1249题目弱了一点,但是还...原创 2018-05-18 22:05:51 · 943 阅读 · 0 评论 -
The Doors ZOJ 1721(计算几何+线段相交+最短路)
The DoorsZOJ - 1721You are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y = 10. The initial a...原创 2018-06-04 08:48:48 · 152 阅读 · 0 评论 -
Wall HDU1348(计算几何+凸包)
WallHDU - 1348 Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's p...原创 2018-06-04 08:56:04 · 198 阅读 · 0 评论 -
Surround the Trees HDU 1392(计算几何+凸包)
Surround the TreesHDU - 1392 There are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minimal required length of the rope. However,...原创 2018-06-04 09:03:21 · 131 阅读 · 0 评论 -
TOYS POJ2318 (计算几何+叉积的应用+二分)
TOYSPOJ - 2318 Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away when he is finishe...原创 2018-05-31 19:32:38 · 150 阅读 · 0 评论 -
Segments POJ3304(计算几何+叉乘的应用)
SegmentsPOJ - 3304 Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected se...原创 2018-05-31 20:41:39 · 150 阅读 · 0 评论 -
Intersecting Lines POJ 1269(计算几何+判断直线间关系+求直线的交点)
Intersecting LinesPOJ - 1269 We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersectio...原创 2018-05-31 22:02:04 · 491 阅读 · 0 评论 -
A Round Peg in a Ground Hole POJ1584(判断凸包+判断点在多边形内+点到直线距离)
A Round Peg in a Ground HolePOJ - 1584 The DIY Furniture company specializes in assemble-it-yourself furniture kits. Typically, the pieces of wood are attached to one another using a woode...原创 2018-06-01 21:47:09 · 198 阅读 · 0 评论 -
Pick-up sticks POJ2653(线段相交判断)
Pick-up sticksPOJ - 2653 Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that i...原创 2018-06-01 22:14:59 · 180 阅读 · 0 评论