HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC-2014-15 Questions > problem:


Ind_02-20. 50745 - Bitonic Sequence

IMPC-2014-15 Questions

Start: Nov.22.2014 at 03:00:00 PM
Finish: Nov.22.2014 at 08:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 4th-2. 50524 - Elevator
• 4th-3. 50535 - Image Compression
• 4th-6. 50536 - Epoka Furgon Shpk
• Ind_01-10. 50752 - Student Groups
• Ind_01-20. 50416 - Placing Domino...
• Ind_01-30. 50764 - Fast Typing Co...
• Ind_01-50. 50718 - Elevator
• Ind_02-10. 50497 - Falling Bricks - ...
• Ind_02-20. 50745 - Bitonic Seq...
• Ind_02-30. 50657 - Permutations an...
• Ind_03-10. 50743 - Total Scholarshi...
• Ind_03-20. 50515 - Lines - Revisited
• Ind_03-40. 50777 - Dwarfs Maze
• Ind_03-50. 50679 - Jetpack Hurdle J...
• Ind_04-10. 50787 - Expected Value
• Ind_04-20. 50520 - Filling a Matrix ...
• Ind_04-30. 50658 - The Message

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.
Question by Ibrahim Mesecan.

Bitonic Sequence

Question: Bitonic sequence is a sequence which first increases and then decreases. Write a program that reads a series of numbers. Then, by placing the biggest number to the middle, it converts this series into a bitonic sequence. Note that from the same series, there can be many sequences giving the bitonic property.

Input specification
You will be given an integer (n) where 0 ≤ n ≤ 10,000. Then, you will be given n integers where each of the numbers is less than 1e8.

Output specification
Place the biggest number to the middle of the list. Then, the first part of list will increase, and the second part will decrease.

Sample Input I
5
7 3 6
5 9
Sample Input II
10
19 11 3 5 9 0
4 7 9 18
Sample Output I
3 5 9 7 6
or, 3 6 9 7 5
both comply the bitonic
sequence property.
Sample Output II
0 4 7 11 18 19 9 9 5 3



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

www.contester.ru