https://www.acmicpc.net/problem/2166
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main() {
int n;
scanf("%d",&n);
double num=0;
double x1,y1;
scanf("%lf %lf",&x1,&y1);
double x0=x1;
double y0=y1;
for(int i=0;i<n-1;i++){
double x2,y2;
scanf("%lf %lf",&x2,&y2);
num+=x1*y2-x2*y1;
if(i==n-2) num+=x2*y0-x0*y2;
x1=x2;
y1=y2;
}
printf("%.1lf",fabs(num)/2.0);
}