HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > SEM 2 - W4 > problem:


50731 - The largest product (2)

SEM 2 - W4

Start: Mar.28.2023 at 04:41:52 PM
Finish: Apr.04.2023 at 08:41:52 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 50730 - The largest product
• 50731 - The largest product (2)
• 50732 - Sorting
• 2012-11-20. 50792 - The student wi...
• 2nd-4. 50513 - Climbing Up the Stairs

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.

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