摘要: 题意:给你n个坐标,求最远的两点距离思路:用凸包算法求处,各个定点,再用旋转凸包卡壳#include #include #include #include using namespace std;#define N 50010struct node{ int x,y,d;}p[N]; int dist(node a,node b){ return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y); }int crossproduct(node a,node b,node c){ return (b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a 阅读全文
posted @ 2014-03-29 13:26 Teemo的技术blog 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题意:略思路:直接套用凸包模板#include #include #include #include using namespace std;#define N 50010struct node{ int x,y,d;}p[N]; int dist(node a,node b){ return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y); }int crossproduct(node a,node b,node c){ return (b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y);}bool cmp1(node a,node 阅读全文
posted @ 2014-03-29 13:19 Teemo的技术blog 阅读(146) 评论(0) 推荐(0) 编辑