HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > Epoka Science Olympiad 2016 > problem:


11-P1. 50906 - The Smallest Pair

Epoka Science Olympiad 2016

Start: Apr.11.2016 at 02:07:57 PM
Finish: Apr.24.2016 at 05:00:00 AM
The contest is finished!
• Contest scoreboard

Contest problems

• 10-P3. 50903 - Basic Math Calculator
• 10-P4. 50904 - Print All Prime Numbers
• 10-P5. 50905 - Convert KPH to MPH
• 11-1. 50967 - Finding Square Roots
• 11-2. 50968 - Number of Letters
• 11-3. 50969 - Chef and Feedback
• 11-4. 50970 - Marbles
• 11-5. 50971 - Belote Game
• 11-P1. 50906 - The Smallest Pair
• 11-P2. 50907 - Second Largest
• 11-P3. 50908 - Buy 1 Get 1
• 11-P4. 50909 - Gold Coins
• 11-P5. 50910 - Flipping Coins
• 6-1. 50937 - Calculate the Average
• 6-2. 50938 - Translate Score into Gr...
• 6-3. 50975 - Cinema Tickets
• 6-4. 50942 - Win or Lose

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

The Smallest Pair

You are given a sequence a1, a2, ..., aN. Find the smallest possible value of ai + aj, where 1 ≤ i < jN.

Input

The first line of each description consists of a single integer N.

The second line of each description contains N space separated integers - a1, a2, ..., aN respectively.

Output

A single line containing a single integer (the smallest possible sum).

Sample Input1:

Sample Input2:

4

5 1 3 4

10

9 2 7 4 5 6 3 8 1 10

Sample Output2:

Sample Output2:

4

3

Explanation of Sample1:

Here we pick a2 and a3. Their sum equals to 1 + 3 = 4.

 

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

www.contester.ru