![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
计算几何
drywwltu
这个作者很懒,什么都没留下…
展开
-
二维计算几何全家桶
#include <cstdio>#include <iostream>#include <algorithm>#include <cmath>using namespace std;#define eps 1e-8#define N 55#define N_MAX N#define PI acos(-1)double R;int n;int sign(double x){ if(fabs(x) < eps)return 0原创 2021-07-29 20:01:15 · 105 阅读 · 0 评论 -
三角剖分
开坑#include <cstdio>#include <iostream>#include <algorithm>#include <cmath>using namespace std;#define eps 1e-8#define N 55#define PI acos(-1)double R;int n;int sign(double x){ if(fabs(x) < eps)return 0; if(x &g原创 2021-07-29 11:06:36 · 80 阅读 · 0 评论 -
自适应辛普森积分
如何求一个函数与坐标系构成的面积?我们可以对函数积分。辛普森积分法就是将一个函数积分的曲线近似的看成二次函数,来验证。#include <cstdio>#include <iostream>#include <cstring>#include <cmath>using namespace std;#define eps 1e-12double l,r;double f(double x){ return sin(x) / x;}d原创 2021-07-28 20:37:43 · 121 阅读 · 0 评论 -
CQOI2005 三角形的面积并
烦人的扫描线#include <iostream>#include <cstdio>#include <cstring>#include <utility>#include <algorithm>#include <vector>#include <cmath>using namespace std;#define eps 1e-8#define N_MAX 105#define INF 1e6int原创 2021-07-28 14:24:00 · 85 阅读 · 1 评论 -
旋转卡壳
#include <cstdio>#include <iostream>#include <cmath>#include <utility>#include <climits>#include <cstring>#include <vector>#include <algorithm>#define eps 1e-8#define N_MAX 300005using std::pair;us原创 2021-06-17 20:50:17 · 99 阅读 · 0 评论 -
最小圆覆盖
#include <cstdio>#include <iostream>#include <cmath>#include <utility>#include <climits>#include <cstring>#include <ctime>#include <algorithm>#define eps 1e-12#define N_MAX 100005#define PI acos(-1)原创 2021-05-27 21:29:40 · 310 阅读 · 1 评论 -
半平面交
未完#include <cstdio>#include <iostream>#include <cmath>#include <utility>#include <climits>#include <cstring>#include <algorithm>#define eps 1e-8#define N_MAX 3005using std::pair;int n,m,cnt;int deq[N_MA原创 2021-05-26 20:26:34 · 117 阅读 · 1 评论 -
凸包
#include <cstdio>#include <iostream>#include <cmath>#include <utility>#include <climits>#include <cstring>#include <vector>#include <algorithm>#define eps 1e-8#define N_MAX 30005using std::pair;usi原创 2021-05-24 21:29:40 · 129 阅读 · 3 评论 -
D - Deep800080
题意给你一条直线,直线两端点为(0,0)和(a,b),在直线上找一圆心,求能覆盖最多的点为多少Sample input7 5 0 1-1 -11 -10 02 33 410 102 12Sample output5看的是这位大佬的#include <cstdio>#include <iostream>#include <cmath>#include <utility>#include <vector>#incl原创 2021-05-22 21:23:39 · 86 阅读 · 0 评论 -
计算几何(基础)
#include <cstdio>#include <iostream>#include <cmath>#include <utility>#define eps 1e-8#define N_MAX 300005using std::pair;int n,m,s,r;int sign(double x){ //符号 if(fabs(x) < eps)return 0; if(x < 0)return -1;原创 2021-05-22 20:41:24 · 185 阅读 · 0 评论