1/*LA 47282凸包算法-旋转卡壳的直径3没有其他技巧,可作为模板运用4注意operator< 中精度的处理,不然会出错5*/6#include <stdio.h>7#include <stdlib.h>8#include <string.h>9#include <math.h>10#include <ctype.h>11#include <string>12#include <iostream>13#include <sstream>14#include <vector>15#...
} intdiameter2(vector<Point>& points)//求凸包的最大直径(旋转卡壳算法){ vector<Point> p = ConvexHull(points); intn = p.size(); if(n == 1)return0; if(n == 2)returnDist2(p[0], p[1]); p.push_back(p[0]); intans = 0; inti=0,j=1; for(;i<n;i++) { while(Cross(...