| Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. 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 
 
514 30 17 26 85
 
 | Sample Output I 
 
44  
 |  Explanation: 
There are 3 numbers in odd positions: 14, 17and85.
And, the min of odd positions is 14. The max of even positions is 30. So, 
the sum is 44. 
 Для отправки решений необходимо выполнить вход.
 
 
 |