Advertisement
mrlolthe1st

Untitled

Aug 12th, 2021
1,414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.41 KB | None | 0 0
  1. Var
  2.     XPrev, YPrev, Sq, X, Y, SX, SY : Int64;
  3.     N : LongInt;
  4. Begin
  5.     Read(N);
  6.     Read(XPrev, YPrev);
  7.     SX := XPrev; SY := YPrev;
  8.     Sq := 0;
  9.     For N := 2 To N Do
  10.     Begin
  11.         Read(X, Y);
  12.         Inc(Sq, (XPrev - X) * (Y + YPrev));
  13.         XPrev := X;
  14.         YPrev := Y;
  15.     End;
  16.     Inc(Sq, (X - SX) * (Y + SY));
  17.     Sq := Abs(Sq);
  18.     WriteLn(SQ Div 2, '.', (Sq Mod 2) * 5);
  19. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement