## List Minimum

View as PDF

Points:4
Time limit:2.0s
Memory limit:256M

Problem types

##### Brute Force Practice 1

You have a list of unique numbers each no larger than . The size of the list is no greater than . You perform the following operation on the list repeatedly: take the minimum of the numbers, and remove it from the list. You stop when the list is empty.

In what order are the numbers removed?

#### Input

The first line will have the size of the list.

Each line after that will be an element of the list. You are guaranteed no two elements are the same.

#### Output

Print one line for each time the operation was performed: the number that was removed at that step.

#### Sample Input

3
5
8
2

#### Sample Output

2
5
8

## Comments

• hello12_2015
commented on Jan. 22, 2017
...

i would NOT ask for that info

• hello12_2015
commented on Jan. 22, 2017
LOL JK

LOL JK

• hello12_2015
commented on Jan. 22, 2017
Clarification

Just To clarify, what IS the answer to this question? :-)

• Xyene
commented on Sept. 27, 2016 edited
Please do not post hints in comments

A note to new users: please do not post notes, hints, or solutions in problem comments.

What may seem obvious to you may not be obvious to others. There are many ways to solve problems like these, and they exist to encourage new contest programmers into thinking about the efficiency of their solutions. Posting a solution — no matter how trivial — defeats this purpose.

• root
commented on Nov. 7, 2016

I just thought this problem is suspiciously simple. The general rule for me is "when you find it too easy, then you have misread the problem"

• Xyene
commented on Nov. 8, 2016

That's fine, and a good intuition for harder problems. However, 3-5 point problems should usually be taken at face value, as there are rarely any tricks involved.

• Kirito
commented on Sept. 27, 2016

Just to clarify, clarifications are allowed, right?

• Xyene
commented on Sept. 27, 2016

Of course, and even hints may be appropriate for harder problems, where a nudge towards the right approach isn't the same as giving the entire problem away.

• Net_Nerd
commented on Oct. 15, 2015
Good Game

Can I say for one that I am an idiot?

I misinterpreted the problem... printing an ordered list every time the minimum value was removed rather than printing the ordered list!