
凸包
小元勋
生生不息 摸鱼不止
展开
-
【模板】二维凸包 / [USACO5.1]圈奶牛Fencing the Cows
圈奶牛Fencing the Cows Code: #include <bits/stdc++.h> using namespace std; const int maxn=10010; const double pi=acos(1.0); struct node { double x,y; }p[maxn],P[maxn]; int n; double ans=0; inline...原创 2019-04-03 21:48:56 · 179 阅读 · 0 评论 -
Beauty Contest--计算几何--Graham扫描法+旋转卡壳
Beauty Contest 题目分析: 题目要找图像上两点最长的距离,那么最长的边的两个顶点肯定在凸包上; 先用Graham扫描法求个凸包,在用旋转卡壳求最长边; 注意处理凸包只有一个点和一条线的情况 Code: #include <bits/stdc++.h> using namespace std; #define maxn 50010 #define ll long long...原创 2019-04-07 08:08:05 · 257 阅读 · 0 评论