摘要:题目大意:空间中有许多无限长的棒子(圆柱体),求棒子间最小距离。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const double eps = 1e-8; 8 struct Point3/...
阅读全文
摘要:openGLTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 170Accepted Submission(s): 77Problem Descrip...
阅读全文
摘要:Mirror and LightTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 814Accepted Submission(s): 385Prob...
阅读全文
摘要:Segment setTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3457Accepted Submission(s): 1290Problem...
阅读全文
摘要:LightningTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1457Accepted Submission(s): 469Problem De...
阅读全文
摘要:Finding MineTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1120Accepted Submission(s): 298Problem...
阅读全文
摘要:Open-air shopping mallsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1822Accepted Submission(s):...
阅读全文
摘要:Rotational PaintingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2498Accepted Submission(s): 702...
阅读全文
摘要:Save Labman No.004Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1473Accepted Submission(s): 484P...
阅读全文
摘要:Quoit DesignTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29344Accepted Submission(s): 7688Prob...
阅读全文
摘要:The famous Korean internet company nhn has provided an internet-based photo service which allows The famous Korean internet company users to directly ...
阅读全文
摘要:题目大意:一个人站在三维坐标系下的原点处用炮打蚊子,给出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){ //如果数据比较多,而输入的
阅读全文
摘要:题目大意:给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...
阅读全文
摘要:题目大意:给两条线段求他们间的最小距离的平方(以分数形式输出)。贴个模版吧!太抽象了。#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)
阅读全文
摘要:题目大意:一个平面区域有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.
阅读全文
摘要:题目大意: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;
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文