随笔分类 -  计算几何

1 2 下一页

hdu 4671 异面直线的距离
摘要:题目大意:空间中有许多无限长的棒子(圆柱体),求棒子间最小距离。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const double eps = 1e-8; 8 struct Point3/... 阅读全文

posted @ 2014-08-26 11:19 雄.. 阅读(163) 评论(0) 推荐(0)

hdu 3320 计算几何(三维图形几何变换)
摘要:openGLTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 170Accepted Submission(s): 77Problem Descrip... 阅读全文

posted @ 2014-08-25 23:28 雄.. 阅读(564) 评论(0) 推荐(0)

hdu 2857 点在直线上的投影+直线的交点
摘要:Mirror and LightTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 814Accepted Submission(s): 385Prob... 阅读全文

posted @ 2014-08-23 00:20 雄.. 阅读(358) 评论(0) 推荐(0)

hdu 1558 线段相交+并查集路径压缩
摘要:Segment setTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3457Accepted Submission(s): 1290Problem... 阅读全文

posted @ 2014-08-22 23:41 雄.. 阅读(202) 评论(0) 推荐(0)

hdu 4305 生成树计数问题
摘要:LightningTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1457Accepted Submission(s): 469Problem De... 阅读全文

posted @ 2014-08-20 17:58 雄.. 阅读(250) 评论(0) 推荐(0)

hdu 4353 统计点在三角形内的个数
摘要:Finding MineTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1120Accepted Submission(s): 298Problem... 阅读全文

posted @ 2014-08-20 11:26 雄.. 阅读(419) 评论(0) 推荐(0)

hdu 3264 圆的交+二分
摘要:Open-air shopping mallsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1822Accepted Submission(s):... 阅读全文

posted @ 2014-08-19 23:31 雄.. 阅读(159) 评论(0) 推荐(0)

hdu 3685 多边形重心+凸包
摘要:Rotational PaintingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2498Accepted Submission(s): 702... 阅读全文

posted @ 2014-08-19 18:39 雄.. 阅读(414) 评论(0) 推荐(0)

hdu 4741 Save Labman No.004异面直线间的距离既构成最小距离的两个端点
摘要:Save Labman No.004Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1473Accepted Submission(s): 484P... 阅读全文

posted @ 2014-07-16 00:07 雄.. 阅读(219) 评论(0) 推荐(0)

hdu 1007 Quoit Design 分治求最近点对
摘要:Quoit DesignTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29344Accepted Submission(s): 7688Prob... 阅读全文

posted @ 2014-06-03 23:53 雄.. 阅读(237) 评论(1) 推荐(0)

LA 3905 Meteor 扫描线
摘要:The famous Korean internet company nhn has provided an internet-based photo service which allows The famous Korean internet company users to directly ... 阅读全文

posted @ 2014-06-03 19:41 雄.. 阅读(192) 评论(0) 推荐(0)

foj 2144 三位几何+区间覆盖
摘要:题目大意:一个人站在三维坐标系下的原点处用炮打蚊子,给出n个蚊子的起始坐标跟单位时间匀速移动的方向向量,距离他R以内的蚊子都可以打到,不过他也需要休息,没蚊子的时候也可以休息下。求他要起来多少次打蚊子。#include #include #include #include using namespace std;const int N = 100005;const double eps = 1e-6;const double Pi=acos(-1.0);int n, cnt;double R;inline bool scan_d(double &ret){ //如果数据比较多,而输入的 阅读全文

posted @ 2014-03-14 19:09 雄.. 阅读(211) 评论(0) 推荐(0)

Foj 2148 二维几何(点是否在三角形内)
摘要:题目大意:给n个坐标(不存在三点共线的点),求能够组成多少个凸四边形。#include#include#includeusing namespace std;struct Point{ int x,y; Point(int x=0,int y=0):x(x),y(y){}}p[35];typedef Point Vector;Vector operator - (Vector A, Vector B){ return Vector(A.x-B.x,A.y-B.y);}int AbsCross(Vector A,Vector B){ return fabs(A.x*B.y-A.y*B... 阅读全文

posted @ 2014-03-14 19:01 雄.. 阅读(202) 评论(0) 推荐(0)

LA 4973异面线段
摘要:题目大意:给两条线段求他们间的最小距离的平方(以分数形式输出)。贴个模版吧!太抽象了。#include#include#includeusing namespace std;struct Point3 { int x, y, z; Point3(int x=0, int y=0, int z=0):x(x),y(y),z(z) { }};typedef Point3 Vector3;Vector3 operator + (const Vector3& A, const Vector3& B) { return Vector3(A.x+B.x, A.y+B.y, A.z+B.z) 阅读全文

posted @ 2013-11-24 20:04 雄.. 阅读(238) 评论(0) 推荐(0)

LA 2797 平面区域dfs
摘要:题目大意:一个平面区域有n条线段,问能否从(0,0)处到达无穷远处(不穿过任何线段)分析:若两条线段有一个端点重合,这种情况是不能从端点重合处穿过的 的。因此对每个端点延长一点,就可以避免这个问题。n*2个端点加上起始点跟终点,两两之间不穿过任何线段的为可行路径建图。最后以(0,0)开始dfs,看能否到达无穷远点。#include#include#include#include#include#includeusing namespace std;const double eps = 1e-12;double dcmp(double x) { if(fabs(x) vertices; ver. 阅读全文

posted @ 2013-11-19 20:00 雄.. 阅读(215) 评论(0) 推荐(0)

LA 2218 半平面交
摘要:题目大意:n名选手参加铁人三项赛,比赛按照选手在三个赛段中所用的总时间排定名次。已知每名选手在三个项目中的速度Ui、Vi、Wi。问对于选手i,能否通过适当的安排三个赛段的长度(但每个赛段的长度都不能为0),来保证他获胜。分析:假设三个赛段的长度分别为x、y、z,则选手i获胜的充要条件就是:x/vi+y/ui+(1-x-y)/wi0本题就转化为求这n-1个不等式对应的半平面的交,加上x>0,y>0,1-x-y>0这三个约束,并判断其面积是否大于0(即排除空集、点、线的情况)。#include#include#include#includeusing namespace std; 阅读全文

posted @ 2013-11-18 22:06 雄.. 阅读(222) 评论(0) 推荐(0)

poj 3525 求凸包的最大内切圆
摘要:Most Distant Point from the SeaTime Limit:5000MSMemory Limit:65536KTotal Submissions:3640Accepted:1683Special JudgeDescriptionThe 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?” T 阅读全文

posted @ 2013-11-18 20:59 雄.. 阅读(766) 评论(0) 推荐(0)

poj 1031 多边形对点(向周围发射光线)的覆盖
摘要:FenceTime Limit:1000MSMemory Limit:10000KTotal Submissions:3018Accepted:1010DescriptionThere is an area bounded by a fence on some flat field. The fence has the height h and in the plane projection it has a form of a closed polygonal line (without self-intersections), which is specified by Cartesian 阅读全文

posted @ 2013-11-13 22:34 雄.. 阅读(511) 评论(0) 推荐(0)

poj 1269 直线间的关系
摘要:Intersecting LinesTime Limit:1000MSMemory Limit:10000KTotal Submissions:9360Accepted:4210DescriptionWe 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 intersection because they are parallel, 2) intersect 阅读全文

posted @ 2013-11-13 19:10 雄.. 阅读(185) 评论(0) 推荐(0)

poj 3304 判断是否存在一条直线与所有线段相交
摘要:SegmentsTime Limit:1000MSMemory Limit:65536KTotal Submissions:8579Accepted:2608DescriptionGivennsegments 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 segments have at least one point in common.In 阅读全文

posted @ 2013-11-13 16:45 雄.. 阅读(293) 评论(0) 推荐(0)

1 2 下一页

导航