随笔分类 - 计算几何——凸包+半平面
摘要:题目链接:http://poj.org/problem?id=1228#include#include#include#include#include#includeusing namespace std;const double eps = 1e-8;const double PI = acos(-1.0);const double INF = 1000000000000000.000;struct Point{ double x,y; Point(double x=0, double y=0) : x(x),y(y){ } //构造函数};typedef Point Ve...
阅读全文
摘要:题目链接:http://poj.org/problem?id=3608#include#include#include#include#include#includeusing namespace std;const int maxn = 10500;const int maxe = 100000;const int INF = 0x3f3f3f;const double eps = 1e-8;const double PI = acos(-1.0);struct Point{ double x,y; Point(double x=0, double y=0) : x(x),y(y...
阅读全文
摘要:题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4199没想透为啥旋转卡壳跟枚举跑时间差不多。n太小吧!枚举法:#include#include#include#include#include#includeusing namespace std;const int maxn = 100050;const int maxe = 100000;const int INF = 0x3f3f3f;const double ep
阅读全文
摘要:题目链接:http://poj.org/problem?id=2187旋转卡壳算法:http://www.cppblog.com/staryjy/archive/2009/11/19/101412.html或 http://cgm.cs.mcgill.ca/~orm/rotcal.frame.html#include#include#include#include#include#includeusing namespace std;const int maxn = 55000;const int maxe = 100000;const int INF = 0x3f3f3f;const dou
阅读全文
摘要:题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1593#include#include#include#include#include#includeusing namespace std;const int maxn = 606;const int maxe = 100000;const int INF = 0x3f3f3f;const double eps = 1e-8;const double PI = acos
阅读全文