![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
计算几何
azheng51714
欢迎加入 老生畅坛 微信公众号
展开
-
poj 3304
知识点:线段与直线相交,注意枚举时重合点的处理#include#includeusing namespace std;#define esp 1e-8struct Point { double x,y; Point(){} Point(double x0,double y0):x(x0),y(y0){}};/*bool isEqual(原创 2012-11-22 13:58:51 · 556 阅读 · 0 评论 -
poj 2381 && 2398 叉积+二分
题意:有一个大箱子,由n个板分为n+1块,标号为0~n 已知盒子左上角和右下角的坐标及每个板上下两端的横坐标(板不会交错,且按顺序给出) 然后给出玩具的坐标,统计每块空间内玩具个数(保证玩具一定落在空间内)方法:叉积+二分,判断点所在的空间 //=================================================原创 2012-11-22 13:53:56 · 720 阅读 · 0 评论 -
poj 1269 知识点:直线相交判断,求相交交点
#includeusing namespace std;const double epx=1e-10;struct Point{ double x; double y;};//求解二元一次方程Point solve(double a1,double b1,double c1,double a2,double b2,double c2){原创 2012-11-22 14:01:31 · 523 阅读 · 0 评论 -
poj 1556
#include#includeusing namespace std;double map[1000][1000];const double esp=1e-6;struct point {//P[]存点的坐标,line[][]存墙的坐标 double x,y;};point P[1000],line[1000][5];double dis[100原创 2012-11-22 14:04:13 · 488 阅读 · 0 评论 -
poj 2653
#include #include#include#includeusing namespace std;const int maxn = 100000 + 5;const double eps=1e-10;struct point{ double x,y;};point p[maxn],b[maxn];bool ans[maxn];doubl原创 2012-11-22 14:05:08 · 687 阅读 · 0 评论 -
计算机几何题目
计算几何 其实也谈不上推荐,只是自己做过的题目而已,甚至有的题目尚未AC,让在挣扎中。之所以推荐计算几何题,是因为,本人感觉ACM各种算法中计算几何算是比较实际的算法,在很多领域有着重要的用途(例如本人的专业,GIS)。以后若有机会,我会补充、完善这个列表。计算几何题的特点与做题要领:1.大部分不会很难,少部分题目思路很巧妙2.做计算几何题目,模板很重要,模板必须高度可靠。3.转载 2012-11-22 13:56:42 · 456 阅读 · 2 评论