
计算几何
Or_me
看山看水独坐,听风听雨高眠,客来客去日日,花开花落年年。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVALive 4127
Link:click here The question:给出n座山的高和宽,山视为等腰三角形,从上往下看,求山的轮廓的长度,山之间的空白不算。 Solution:用竖线在山与山的交点和顶点处,把所有山分成一段一段的的线段,统计竖线内每段线段的长度,累加即可。先把所有端点的横坐标放入数组X里, 然后对线段两两求交,把交点的横坐标也放入数组X里,然后排序去重。求出每条线段与竖线的交点的y坐标的原创 2016-03-21 18:42:31 · 411 阅读 · 0 评论 -
计算几何模板 - 全
#include <cmath> #include <cstdio> #include <iostream> using namespace std; struct Point { double x,y; Point(double x=0.0,double y=0.0):x(x),y(y) {}//构造函数,方便函数编写 }; typedef Point Vector;//Vecto原创 2015-04-25 06:50:35 · 727 阅读 · 0 评论 -
计算几何模板 - 大白书
#include #include using namespace std; struct Point { double x,y; Point(double x=0,double y=0):x(x),y(y) {}//构造函数,方便函数编写 }; typedef Point Vector;//Vector只是Point的别名 Vector operator + (Vector原创 2014-10-03 15:23:54 · 742 阅读 · 0 评论 -
凸包模板!
//NYOJ 78 #include #include #include using namespace std; int n; struct Point { int x, y; bool operator < (const Point& other) const { if(x != other.x) return x < other.x; return y < othe原创 2014-07-29 09:40:18 · 586 阅读 · 0 评论 -
二维计算几何基础
二维原创 2014-09-26 18:39:45 · 923 阅读 · 0 评论 -
HDU 1086(线段判交)
的发顺丰原创 2014-04-08 13:35:53 · 919 阅读 · 0 评论 -
HDU 5128
Link:click here The question:在平面上给出n(4 <= n <= 30)个点,从中选出8个点够成两个矩形,使得矩形的面积最大,如果不存在,输出”imp”。原创 2016-03-22 18:55:22 · 549 阅读 · 0 评论