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

Турниры > IMPC16 Group Contests > задача:


02. 50833 - Min of Odd Positions

IMPC16 Group Contests

Старт: 16.янв.2016 в 10:00:00
Финиш: 16.янв.2016 в 14:00:00
Турнир завершён!
• Турнирная таблица

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

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

• 01. 50832 - Rock Paper Scissors Liz...
• 02. 50833 - Min of Odd Positions
• 03. 50834 - The train which leaves ...
• 11. 50859 - Low performance
• 12. 50860 - Number of Student Certi...
• 13. 50861 - The largest Student Group
• 14. 50862 - Sum of the Pairs
• 15. 50863 - Total Access Cost of a BST
• 21. 50873 - Max Frequency
• 22. 50874 - Apartment Building Adm...

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Min of Odd Positions

Math professor of your brother has given a homework. He has given a series of numbers. And, he is asking the sum of (min of odd positions) and (max of even positions).

Question: Write a program that is going to read n numbers and show the result.

Input specification
In the first line, you will be an integer, the number of numbers (n) where 0 ≤ n ≤ 40,000. Then, in the following n lines, you will be given n integers where the numbers are between -1e8 and +1e8
Note: The number positions goes from 1 to n.

Output specification:
Show the sum of the minimum of odd positions and the maximum of even positions.

Sample Input I
5
14 30 17 26 85
Sample Output I
44

Explanation: There are 3 numbers in odd positions: 14, 17 and 85. And, the min of odd positions is 14. The max of even positions is 30. So, the sum is 44.



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

www.contester.ru