几何问题
ACM_Nestling
这个作者很懒,什么都没留下…
展开
-
UVAOJ 11178——Morley’s Theorem
这是一道计算几何的模板题,求点D的时候,就把角ABC求出来,然后除以三,然后把BC边旋转一下,同理求出BCA的度数,然后除以三,再把CB旋转一下,两个旋转以后的交点就是D。用同样的方法求出E和F。代码如下:#include#include#includeusing namespace std;struct point{ double x,y; point (double x=0原创 2014-03-28 07:53:41 · 476 阅读 · 0 评论 -
ZOJ 2967——Colorful Rainbows
题意:有最多5000条线,要求出这些线里面能看到几条。能看到的线是指这条线在一个区间内比其他任何线的y坐标都要大。原创 2015-07-27 14:51:45 · 523 阅读 · 0 评论 -
hdu 4998——Rotate
题意:一个平面绕着一些点原创 2014-10-04 12:11:24 · 440 阅读 · 0 评论 -
HDU 3756,LA 4986——Dome of Circus
题目大意:一个马戏团要建一个锥形的帐篷,原创 2014-05-22 23:03:26 · 677 阅读 · 0 评论 -
2014北京邀请赛 F Football on Table
代码如下:#include#include#includeusing namespace std;double row;double pos[105];double tail[105];int num;double wid[105];double X,Y,dx,dy;const double eps=1e-10;double dcmp(double x){ if(f原创 2014-05-21 22:30:32 · 451 阅读 · 0 评论 -
UVA 11646 - Athletics Track
圆的内角等于外角的两倍代码如下:#include#include#includeusing namespace std;const double pi=acos(-1);int main(){// freopen("data.txt","r",stdin); ios::sync_with_stdio(false); double a,b; char aa; int原创 2014-04-27 23:03:50 · 455 阅读 · 0 评论 -
UVA 11817 - Tunnelling the Earth
题目大意:输入两个点的纬度跟经度,要求求出这两个原创 2014-05-18 23:04:48 · 633 阅读 · 0 评论 -
HDU 3685——Rotational Painting
题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=3685先求出原创 2014-04-11 11:16:45 · 570 阅读 · 0 评论 -
HDU 3264——Open-air shopping malls
把题目中的在一个商场的中心理解成了在原创 2014-04-10 22:45:41 · 555 阅读 · 0 评论 -
UVA 11800 - Determine the Shape
判断四边形形状的。题目中只要求输入整型数据,所以定义结构体的时候用INT没用double代码原创 2014-04-23 00:20:22 · 636 阅读 · 0 评论 -
LA 2572 - Viva Confetti
这道题是训练指南上面的例题,判断小圆弧的时候,求出一个圆跟原创 2014-04-06 08:47:33 · 571 阅读 · 0 评论 -
UVA 11437 - Triangle Fun
一道模板题,求三等分点然后原创 2014-04-21 09:40:13 · 489 阅读 · 0 评论 -
UVAOJ 12304 - 2D Geometry 110 in 1!
这是一道几何模板题,但是难度就在于把六种几何问题放在了一起,代码一长就不好改错。原创 2014-04-04 10:08:06 · 576 阅读 · 0 评论 -
ZOJ 3728——Collision
There's a round medal fixed on an ideal smooth table, Fancy is trying to throw some coins and make them slip towards the medal to collide. There's also a round range which shares exact the same center原创 2014-05-04 11:01:29 · 548 阅读 · 0 评论 -
UVA 11796 - Dog Distance
代码打错了好多次,结果好多次WA。代码如下:#include#include#includeusing namespace std;struct point{ double x,y; point(double x=0,double y=0):x(x),y(y){}};typedef point vector;vector operator + (vector a,v原创 2014-03-31 08:57:01 · 489 阅读 · 0 评论 -
LA 3263 - That Nice Euler Circuit
这是刘汝佳训练指南上面的例题。这是一道几何计算题目,在判断两个数是否相等的时候,使用了函数dcmp而不是直接==,原因是计算的精度会带来一定的误差,当一个数小于一定量的时候,就认为它是零,这样就允许了一定量的误差。unique函数可以将数组中重复的元素去掉,返回末尾元素的地址。代码如下:#include#include#include#includeusing namesp原创 2014-03-30 09:15:45 · 517 阅读 · 0 评论 -
hdu 4741——Save Labman No.004
题意:求两个空间直线的距离,并求出这两个直线中距离最近两个点的坐标原创 2015-07-23 17:54:05 · 462 阅读 · 0 评论