![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
旋转卡壳
SC.ldxcaicai
我很菜=_=
展开
-
2018.10.18 poj2187Beauty Contest(旋转卡壳)
传送门 旋转卡壳板子题。 就是求凸包上最远点对。 直接上双指针维护旋转卡壳就行了。 注意要时刻更新最大值。 代码: #include<iostream> #include<cstdio> #include<algorithm> #define N 50005 using namespace std; inline int read(){ int ans=0,...原创 2018-10-18 08:33:16 · 163 阅读 · 0 评论 -
2018.10.18 bzoj1185: [HNOI2007]最小矩形覆盖(旋转卡壳)
传送门 不难看出最后的矩形一定有一条边与凸包某条边重合。 因此先求出凸包,然后旋转卡壳求出当前最小矩形面积更新答案。 代码: #include&lt;bits/stdc++.h&gt; #define N 50005 #define eps 1e-9 using namespace std; struct pot{ long double x,y; inline pot operator+(c...原创 2018-10-18 10:39:48 · 189 阅读 · 0 评论