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

Разделы > Сортировка и последовательности > задача:


50731 - The largest product (2)

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

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

• 50352 - Selling Cows
• 50872 - Top M Grades
• 50868 - Sort Frequencies
• Trip to Librazhd
• 50912 - Trip to Librazhd
• 50914 - Buy 3, Pay 2
• 50732 - Sorting
• 50730 - The largest product
• 50731 - The largest product (2)
• 50737 - Sum of the k-largest numbers
• 50492 - Contest Scoreboard
• 50320 - Random Sorted List
• 50738 - Median value
• 50317 - Student Line Up
• 50311 - Student Line Up
• 50736 - Top N Donors - 2
• 50333 - Series of Squares

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

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

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

Given N integers. You are asked to choose three of them such that whose product is maximum.

Input
In the first line N - the number of numbers in sequence (3 <= N <= 100) is given. Further, the sequence is written: N of integers which are less than 1000.
Output
See three unknown numbers in any order. If there are several different triples, giving the maximum product, then bring out any of them.

input 1 Input 2
9
3 5 1 7 9 0 9 -3 10
3
-5 -300 -12
Output 1 Output 2
9 9 10
-5 -300 -12

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

www.contester.ru