HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC - 2013-2014 > problem:


14-04-30. 50669 - Area of an Irregular Polygon

IMPC - 2013-2014

Start: Mar.16.2013 at 12:00:00 PM
Finish: Mar.16.2013 at 05:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 14-03-30. 50377 - kth Permutation
• 14-03-40. 50773 - Balanced Sum Tree
• 14-03-60. 50382 - Parkside's Other ...
• 14-03-70. 50468 - Draw Matrix - 2
• 14-03-70. 50468 - Draw Matrix - 2
• 14-03-80. 50675 - Kruja Boys
• 14-03-90. 50717 - Hurdle Jumping
• 14-04-20. 50493 - n-digit kth Prime ...
• 14-04-30. 50669 - Area of an Ir...
• 14-04-40. 50712 - Moon algebra
• 14-04-50. 50697 - Base Stations
• 14-05-10. 50723 - Tribonacci
• 14-05-20. 50677 - The Cottage
• 14-05-20. 50413 - Valid Permutations
• 14-05-30. 50688 - Epoka Furgon
• 14-05-30. 50706 - The most crowd...
• 14-05-40. 50689 - The biggest build...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Area of an Irregular Polygon

When calculating the area of an irregular polygon, all the vertices are written down in order ending with the starting vertex. Then the product of first y with the second x is subtracted from the product of first x is with the second y, etc.

Question:
Write a program that calculates the area of the given polygon.

Input specification
You are given first an integer number n 0 ≤ n ≤ 10,000. Then, in the following n lines you are given coordinates of an irregular polygon. Each coordinate x and y can have any value between -20,000 and +20,000.

Output specification
Show one number with one digit double precision: Area of the given polygon.

 Sample Input   
 5
 -3 -2
 -1 4
 6 1
 3 10
 -4 9
 Sample Output   
 60


Для отправки решений необходимо выполнить вход.

www.contester.ru