[USACO5.1]圈奶牛Fencing the Cows /【模板】二维凸包
输入样例
4
4 8
4 12
5 9.3
7 8
输出样例
12.00
解题思路
凸包模板题
AC代码
#include<algorithm>
#include<cstdio>
#include<cmath>
using namespace std;
int n,tot;
double ans;
struct node
{
double x,y;
}a[100005],q[100005];
double cj(node x1,node x2,node x3,node x4)
{
return (x2.x-x1.x)*(x4.y