ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > IMPC - 2013-2014 > задача:


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

IMPC - 2013-2014

Старт: 16.мар.2013 в 12:00:00
Финиш: 16.мар.2013 в 17:00:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 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. s
• 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...

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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