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

Турниры > Epoka Science Olympiad 2013-2015 > задача:


2014-10Gr-10. 50424 - Area

Epoka Science Olympiad 2013-2015

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

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

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

• 50958 - ATM
• 2013-10Gr-10. 50310 - Kinetic Energy
• 2013-10Gr-20. 50311 - Student Line Up
• 2013-10Gr-40. 50313 - Pattern Disp...
• 2013-11Gr-10. 50314 - Falling Distance
• 2013-11Gr-20. 50315 - Pig Latin
• 2013-11Gr-30. 50316 - Population B...
• 2013-11Gr-40. 50317 - Student Line Up
• 2014-10Gr-10. 50424 - Area
• 2014-10Gr-20. 50417 - Fun Fair
• 2014-10Gr-30. 50418 - Student ave...
• 2014-10Gr-40. 50429 - Secret Message
• 2014-11Gr-10. 50430 - ATM
• 2014-11Gr-20. 50420 - Teachers Si...
• 2014-11Gr-30. 50431 - Sultan's Game
• 2015-09Gr-10. 50344 - Profit or Loss
• 2015-09Gr-20. 50725 - Fibonacci Se...

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
bfs.

Area

A large agricultural corporation is undertaking an audit of its N land properties. As a first step, they would like to know the total area of their properties.

Each property has a rectangular shape, and no two properties overlap.

Question: Write a program that, given the dimensions of N land properties, determines the sum of their areas.

Input specification:
Your program should read from the standard input the following data:

  • The first line contains a single integer: the number of properties N.
  • The next N lines describe the properties, one property per line. The kth of these lines describes property number k and it contains two integers separated by a single space: the lengths of the sides of the property Ak and Bk measured in meters

Constraints:
  1 ≤ N ≤ 50000 { The number of land properties
  1 ≤ (Ak , Bk) ≤10000 { The lengths of the sides of property k

Output specification:
Your program should write to the standard output a single line containing a single integer: the total area of all properties, measured in square meters.

Note:
The final answer may not fit in 32 bits. You have to use a 64-bit data type, such as long long in C/C++, in order to compute and store the answer in a single variable.

 Sample Input I     Sample Input II   
 3
 15 25
 5 6
 3 1
 4
 400 400
 200 200
 100 100
 50 50
 Sample Output I     Sample Output II   
 408
 212500


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

www.contester.ru