Description After scrimping and saving for years, Farmer John has decided to build a new barn. He wants the barn to be highly accessible, and he knows the coordinates of the grazing spots of allN(2 ≤N≤ 10,000 cows. Each grazing spot is at a point with integer coordinates (Xi,Yi) ...
poj 3269 Building A New Barn #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> using namespace std; const int maxn=1e4+9; int x[maxn],y[maxn]; struct D { int x,y; bool operator <(const D &xx)const { if(x==xx.x) return y...
y[maxn];structD{intx,y;booloperator<(constD&xx)const{if(x==xx.x)returny<xx.y;returnx<xx.x;}}point[maxn];intabs(inta){if(a<0)return-a;returna;}intmain(){// freopen("in.txt","r",stdin);intn;scanf("%d",&n);for(inti...
Building A New Barn Description After scrimping and saving for years, Farmer John has decided to build a new barn. He wants the barn to be highly accessible, and he knows the coordinates of the grazing spots of allN(2 ≤N≤ 10,000 cows. Each grazing spot is at a point with integer ...