#P322. 练54.5 损失最小
练54.5 损失最小
Description
There are pieces of artwork, each with a value of . Xiaoming is preparing to take these artworks to an auction, but unfortunately, he encounters a robber on the way. The robber doesn't understand art and only wants money, not to harm Xiaoming. He demands that Xiaoming give him pieces of artwork. Xiaoming dares not resist and must comply with the robber's demand. Please help calculate which pieces of artwork should be given to the robber to minimize the loss.
Input Format
The first line contains two positive integers and , as described above.
The second line contains integers , representing the value of each piece of artwork.
Data range: , .
Output Format
Output lines, each containing one integer representing the value of the artwork to be given. You must output them in ascending order.
Sample
12 9
59 85 76 26 66 92 51 15 2 35 85 492
15
26
35
49
51
59
66
76