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

Сборники > Kovrov IT > задача:


50669 - Area of an Irregular Polygon

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

Задачи сборника

• 50870 - ZScore normalization
• 50869 - Birthday Celebration
• 50821 - Derivative of an array
• 50513 - Climbing Up the Stairs
• 50854 - Area of Triangle Revised
• 50520 - Filling a Matrix Randomly
• 50497 - Falling Bricks - Revisited
• 50847 - The first m trains to leave
• 50669 - Area of an Irregular Po...
• 50860 - Number of Student Certificates
• 50444 - n digit kth number divisible...
• 50865 - Apartment Building Adminis...
• 51011 - Decoding the Path
• 51019 - Finding the hidden message
• 51002 - The most successful classes
• 50525 - Ordering Pizza
• 50342 - 100 Factorial

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

Если у вас есть предложения или пожелания по работе 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