凸包
while WA er
这个作者很懒,什么都没留下…
展开
-
【计算几何】【三维凸包】【模板】三维凸包
here 落谷上水过得第一道黑题 还是个模板,发个博客庆祝庆祝 ac code #include <bits/stdc++.h> #define pb push_back #define ld long double using namespace std; const int eps = 1e-8; const int MAXN = 2005; int sgn(double x){ if(fabs(x) < eps)return 0; if(x < 0)return -1;原创 2021-09-13 12:06:58 · 216 阅读 · 0 评论 -
【计算几何】【凸包新板子】【模拟】[CERC2016]凸轮廓线 Convex Contour
here 根据输入的字母,在一行中横向放入几何图形,最后求一个凸包周长。要提到的是,这里的几何是有圆形的,并且用之前的凸包模板会存在一个点重合的问题。 这个不会有这样的问题,所以换了新的模板,注意使用就好啦! 这两天要花时间研究一下kuangbin的计算几何模板,至少我要知道该怎么用才可以。 ac code #include <bits/stdc++.h> #define pb push_back #define ld long double using namespace std; cons原创 2021-09-13 10:41:48 · 153 阅读 · 0 评论 -
P6247【计算几何】【凸包】【旋转卡壳】【最近最远点对】【分治】[SDOI2012]最近最远点对
here 一个nloglogn的求最近点对的分治算法,配一个标准的凸包旋转卡壳求最远距离的算法。 //god with me //#pragma GCC optimize(1) //#pragma GCC optimize(2) //#pragma GCC optimize(3,"Ofast","inline") //#include <bits/stdc++.h> #include <algorithm> #include <iostream> #include &l原创 2021-08-13 17:17:46 · 141 阅读 · 0 评论 -
EOJ1019 【凸包】【旋转卡壳】【凸包直径】【模板】着弹力
题目入口 也是求最大距离就行了。但是不知道为什么用之前的模板就会出现超时问题??? 现在还不明白为什么会这样。。。。。 等我明白了回来写说明。 原版TL代码 #include <iostream> #include<algorithm> #include <cstdio> #include <cmath> #include <bits/stdc++.h> #define int long long #define re register int /原创 2021-07-29 16:15:49 · 160 阅读 · 0 评论 -
HDU1392【凸包】【凸包周长】【Surround the Trees】
凸包求出来 求一个周长 特判一下只有一个点和一条边的情况。还有就是注意一下精度问题。 题目入口 #include <bits/stdc++.h> #include <iostream> #include<algorithm> #include <cstdio> #include <cmath> #define re register int #define int long long #define inf 0x3f using namespac原创 2021-07-29 15:30:44 · 60 阅读 · 0 评论