计算几何
文章平均质量分 83
「已注销」
这个作者很懒,什么都没留下…
展开
-
杭电2036 多边形面积求解
改革春风吹满地Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30105 Accepted Submission(s): 15518Problem Description“ 改革春风吹满地,不会AC原创 2016-01-30 09:46:30 · 797 阅读 · 0 评论 -
poj 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 finished playing with them. They gave原创 2017-07-19 08:35:01 · 295 阅读 · 0 评论 -
51nod 判断线段是否相交 poj Segments直线与多条线段相交
给出两条线段的端点,判断是否相交包括端点处的判断若不包括端点处的,就在下面判断相交函数中去掉等号#include#include#includeusing namespace std;const double eps=1e-8;struct Point{ double x,y; Point(){} Point(doubl原创 2017-05-22 11:15:23 · 412 阅读 · 0 评论 -
poj 1269判断两条直线的位置关系 以及求交点
判断重合,相交,平行三种关系#include#include#include#includeusing namespace std;struct Point{ double x,y; Point(){} Point(double _X,double _Y){ x = _X; y = _Y; }};P原创 2017-07-19 11:15:37 · 725 阅读 · 0 评论 -
poj 1556 计算几何(判断线段相交+建图)+最短路
The DoorsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8779 Accepted: 3369DescriptionYou are to find the length of the shortest path through a chamber原创 2017-07-19 15:53:50 · 394 阅读 · 0 评论 -
poj 1066 判断线段相交 思维
Treasure HuntTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7175 Accepted: 2946DescriptionArcheologists from the Antiquities and Curios Museum (ACM) ha原创 2017-07-19 17:30:52 · 287 阅读 · 0 评论 -
A - Area 51 Gym - 101334A 计算几何 极坐标 poj 1696 极坐标排序
题意:给定n个位于第一和第二象限的点,每一个点都有一个符号表示给出一个序列,问从x轴的哪些区间从做往右看刚好符合这个序列题解:输入后进行极坐标排序,以负无穷为源点,按角的大小降序排列,若有相同角的就按照近的在前再计算区间的分割点然后枚举区间,看是否符合题意这里不需要在枚举区间的时候都进行极坐标排序,只需要经过一个区间分割点的时候将原创 2017-06-04 17:55:57 · 672 阅读 · 0 评论 -
poj 3335 3130 1279 判断是否有核
Sample Input 24 0 0 0 1 1 1 1 08 0 0 0 2 1 2 1 1 2 1 2 2 3 2 3 0Sample Output YESNO题意:顺时针给出n个点,求这个多边形是否有核,有就输出yes,否则输出no题解:套模板多边形核的理解:在此多边形里面放一个摄像头,它可以扫到多原创 2017-08-10 09:38:19 · 355 阅读 · 0 评论 -
poj 3525 多边形内核,缩进
The main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: “Where is the most distant point from the sea?” The answer to this question原创 2017-08-10 10:49:39 · 406 阅读 · 0 评论 -
hdu 6055 简单计算几何,查找点的四种办法 2017 Multi-University Training Contest - Team 2
Regular polygonTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 857 Accepted Submission(s): 312Problem DescriptionOn a two-dimensi原创 2017-07-28 09:04:03 · 340 阅读 · 0 评论 -
hdu 6158 The Designer 计算几何之圆反演 2017中国大学生程序设计竞赛 - 网络选拔赛
The DesignerTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 830 Accepted Submission(s): 158Problem DescriptionNowadays, little ha原创 2017-08-21 11:29:52 · 621 阅读 · 0 评论 -
hdu 6127 计算几何模拟题(旋转扫描线)
Hard challengeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 579 Accepted Submission(s): 235Problem DescriptionThere are n p原创 2017-08-16 08:42:45 · 661 阅读 · 0 评论 -
hdu 6206 模板题 2017 ACM/ICPC Asia Regional Qingdao Online
三点确定一个圆的计算方法最近在写的一个软件需要根据三个坐标点来计算一个圆。因此花了点时间推导了相关的公式。这个推导不算太难,放在这里主要是做个备忘。我们设一个圆的圆心坐标为 (x0,y),半径为r。那么这个圆的方程可以写为:(x−x0)2+(y−y0)2=r2在这个圆上随便取三个点,设这三个点的坐标分别是 (x1,y1),(x2,y2),(x3,y3)。那么有:转载 2017-09-17 20:43:42 · 411 阅读 · 0 评论 -
I - Land Division Gym - 101243I 计算几何 切割凸包
题意:给出一个n个顶点的凸包,将此凸包分为两个多边形,得到的凸包的顶点数是m k若不能分割得到这样的顶点数的凸包就输出 -1题解:分四种情况,自己可以在草稿上完成,即是否从顶点开始切割凸包#include#include#include#includeusing namespace std;#define MAXN 110#define原创 2017-07-17 20:08:43 · 486 阅读 · 0 评论 -
poj 3449 判断许多个几何图形是否相交
Geometric ShapesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 1814 Accepted: 770DescriptionWhile creating a customer logo, ACM uses graphical utilit原创 2017-07-21 10:31:42 · 479 阅读 · 0 评论 -
poj 1039 直线与直线相交的问题
The GX Light Pipeline Company started to prepare bent pipes for the new transgalactic light pipeline. During the design phase of the new pipe shape the company ran into the problem of determining how原创 2017-07-20 20:16:24 · 467 阅读 · 0 评论 -
poj 1269 判直线共线,平行,求交点
Intersecting LinesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14636 Accepted: 6461DescriptionWe all know that a pair of distinct points on a plane原创 2016-08-23 09:55:59 · 510 阅读 · 0 评论 -
poj 2318 直线和点位置关系(二分查找)
TOYSTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14029 Accepted: 6781DescriptionCalculate the number of toys that land in each bin of a partitioned转载 2016-08-23 11:30:48 · 305 阅读 · 0 评论 -
hdu 线段树 (矩形面积并+离散化+二分查找)
AtlantisTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11823 Accepted Submission(s): 4990Problem DescriptionThere are several an转载 2017-01-20 23:02:41 · 388 阅读 · 0 评论 -
计算几何之大圆包含小圆问题
题意:给出一个大圆,n个小圆 #include#include#include#includeusing namespace std;#define MAXN 100005#define LL long longpairp[MAXN*2];int main(){ int n,R,T; int x,y,r; freopen原创 2017-05-28 12:29:36 · 8541 阅读 · 0 评论 -
Graham算法模板 F 题Saint John Festival 20152016-acmicpc-southwestern-europe-regional-
题目就是要求解有多少个点可以被至少一个三角形围住,这个点可以在三角形的边上题解:每一个点肯定会在最大的凸包里面,所以我们求解一个凸包,然后二分点,寻找这样的三角形即可#include#include#include#include#includeusing namespace std;#define MAXN 10005const double eps=原创 2017-05-19 12:42:32 · 817 阅读 · 0 评论 -
多边形面积 尺取法 B - Birthday Cake Gym - 100090B
题意:给出一个多边形,顶点按照逆时针给出让你选择两个点,使这两个点连线尽可能均分多边形面积题解:先求总面积,以及前缀面积和,然后运用尺取法这里很好的运用了叉积的性质,因为叉积可以将不属于多边形的面积正负进行抵消然后在运用尺取法的时候可以很容易求解顶点 i j 连线后其中一半的面积这里注意尺取法的时候要处理超出面积一半的情况,因为超出面积一半的时候也可能是最小的原创 2017-05-22 01:29:58 · 401 阅读 · 0 评论 -
G - Playing With Geometry Gym - 100783G 简单计算几何
题意:给出两个图,通过缩小,问两个图是否是相同的缩小的时候不是按比例,比如说两行间距为三可以缩小为二,为6可以缩小为5题解:缩小过程用去重函数先去重,和lower_bound函数计算当前点可以缩小到某一行旋转的话可以把图像先放到第二象限,然后转到第一象限即可,然后用稳定的快速排序进行排序即可#include#include#includeusing n原创 2017-06-06 17:23:53 · 581 阅读 · 0 评论 -
F - City Park Gym - 100783F 计算几何+并查集
题意:给出许多个矩形,不重叠问连通的矩阵块面积最大是多少题解:因为没有重叠的,所以我们可以分别对水平线和垂直线进行并查集合并这里我犯了一个并查集的错误,就是在累加面积的时候写反了void Unite(int num1,int num2){ int tx=find_it(num1); int ty=find_it(num2); if(tx!=ty){原创 2017-06-07 01:35:21 · 599 阅读 · 1 评论 -
三维计算几何模板--表面三角形个数 表面多边形个数 三维凸包 表面积 凸包重心 点到面的距离
题意:给出两个三维凸包,问通过旋转,得到两重心距离最短是多少题解:模板先计算凸包再计算重心再计算重心到表面的最短的距离两个最短距离相加即可#include#include#include#includeusing namespace std;const int MAXN=550;const double eps=1e-8;stru原创 2017-06-09 12:23:31 · 553 阅读 · 0 评论 -
三角形外心 点到圆弧的距离
#include#include#include#includeusing namespace std;struct Point{ double x,y; Point(){} Point(double xx,double yy){ x=xx,y=yy; }};struct line{ Point a,b;};doub原创 2017-06-11 15:58:40 · 674 阅读 · 0 评论 -
poj 2826 判断线段位置关系复杂题目(真的气)
An Easy Problem?!Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13678 Accepted: 2103DescriptionIt's raining outside. Farmer Johnson's bull Ben wants so原创 2017-07-20 17:31:01 · 391 阅读 · 0 评论