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

Разделы > Геометрия > задача:


50669 - Area of an Irregular Polygon

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

Задачи раздела

• 50328 - How far away
• 50397 - The Number of Points in a ...
• 50399 - Mobile Base Station
• 50487 - Radius of Inscribed Circle
• 50480 - What quadrant is it?
• 50825 - Drawing Polygon
• 50508 - The Biggest Area
• 50854 - Area of Triangle Revised
• 50669 - Area of an Irregular Po...
• 51034 - Area of 3 Shapes
• 50349 - Area of a Triangle
• 50348 - Area and Perimeter of a Rec...
• 50354 - Intersecting Rectangles
• 50560 - Distanca maksimale
• 50660 - Треугольник и точка
• 50665 - Площадь пересечения
• 50666 - Открытка и конверт

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

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