Submit | All submissions | Best solutions | Back to list |
EIKMAX - K greatest numbers |
Given n integers which the absolute value of each is not over 10^18, output k greatest elements.
Input
The first line contains two integers n and k (k<=n<=10^5).
The second lines contains n integers.
Output
A single line contains k greatest integers in descending order.
Example
Input: 5 3
1 6 5 0 7 Output: 7 6 5