求出凸包的面积除以50就是ans。
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
using namespace std;
#define FOR(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define DOR(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define oo 1e6
#define eps 1e-8
#define nMax 100010
#define pb push_back
#define F first
#define S second
#define bug puts("OOOOh.....");
#define zero(x) (((x)>0?(x):-(x))<eps)
int dcmp(double x){
if(fabs(x)<eps) return 0;
return x>0?1:-1;
}
class point {
public:
double x,y;
point (double x=0,double y=0):x(x),y(y) {}
void make(double _x,double _y) {x=_x;y=_y;}
void read() { scanf("%lf%lf",&x,&y); }
void out() { printf("%.2lf %.2lf\n",x,y);}
double len() { return sqrt(x*x+y*y); }
point friend operator - (point const& u,point const& v) {
return point(u.x-v.x,u.y-v.y);
}
point friend operator + (point const& u,point const& v) {
return point(u.x+v.x,u.y+v.y);
}
double friend operator * (point const& u,point const& v) {
return u.x*v.y-u.y*v.x;
}
double friend operator ^ (point const& u,point const& v) {
return u.x*v.x+u.y*v.y;
}
point friend operator * (point const& u,double const& k) {
return point(u.x*k,u.y*k);
}
friend bool operator < (point const& u,point const& v){
if(dcmp(v.x-u.x)==0) return dcmp(u.y-v.y)<0;
return dcmp(u.x-v.x)<0;
}
friend bool operator != (point const& u,point const& v){
return dcmp(u.x-v.x) || dcmp(u.y-v.y);
}
};
typedef class line{
public:
point a,b;
line() {}
line (point a,point b):a(a),b(b){}
void make(point u,point v) {a=u;b=v;}
void read() { a.read(),b.read(); }
}segment;
int ConvexHull(point *p,int n,point *ret){
sort(p,p+n);
int m=0;
for(int i=0;i<n;i++){
while(m>1 && dcmp((ret[m-1]-ret[m-2])*(p[i]-ret[m-1]))<=0) m--;
ret[m++]=p[i];
}
int k=m;
for(int i=n-2;i>=0;i--) {
while(m>k && dcmp((ret[m-1]-ret[m-2])*(p[i]-ret[m-1]))<=0) m--;
ret[m++]=p[i];
}
if(n>1) m--;
return m;
}
double Area(point *p,int n){
// bug
double ret=0.0;
for(int i=1;i<n-1;i++){
// printf("---i=%d\n",i);
// printf("---%.2lf\n",(p[i]-p[0])*(p[i+1]-p[i]);
ret += (p[i]-p[0])*(p[i+1]-p[i])*0.5;
}
//printf("%.2lf\n",ret);
return fabs(ret);
}
point p[nMax],q[nMax];
int n;
int main(){
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
#endif
while(~scanf("%d",&n)){
FOR(i,0,n-1) p[i].read();
int m=ConvexHull(p,n,q);
double area = Area(q,m);
printf("%d\n",(int)area/50);
}
return 0;
}