摘要: 计算两个凸包之间的最小距离,旋转卡壳法详解在旋转卡壳的用法之计算两个凸 包上的最近距离#include #include#include#includeusing namespace std;const double eps=1e-10;const double INF=1e10;struct point{ double x,y; point (double a=0,double b=0) { x=a; y=b; }};double min_val(double a,double b){ return a>b?b:a;}int dcmp... 阅读全文
posted @ 2013-12-01 21:15 来自大山深处的菜鸟 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 以POJ的2420为例来说明一下,我感觉这个应该算得上是二分吧.先进行点的变换,确定当前最优,在二分距离,这样应该就能得出答案了吧!#include #include#include#includeusing namespace std;struct point{ double x,y; point (double a=0,double b=0){x=a;y=b;}}p[105];double work1(point a,int n){ int i; double ans; ans=0; for(i=0;i0.1) { f... 阅读全文
posted @ 2013-12-01 10:45 来自大山深处的菜鸟 阅读(214) 评论(0) 推荐(0) 编辑