Cod sursa(job #900622)
Utilizator | Data | 28 februarie 2013 20:52:42 | |
---|---|---|---|
Problema | Aria | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
program arie;
var f,g:text;
n,i:longint;
x,y:array[1..100002] of longint;
s:longint;
begin
assign (f,'aria.in'); reset (f);
assign (g,'aria.out'); rewrite (g);
readln (f,n);
for i:=1 to n do
readln (f,x[i],y[i]);
x[n+1]:=x[1]; y[n+1]:=y[1];
s:=0;
for i:=1 to n do
s:=s+(x[i]*y[i+1]-x[i+1]*y[i]);
write (g,trunc(s/2));
close (f); close (g);
end.