Given an array of non-negative integers
Input Specification
You will receive three lines of input. The first line will contain positive integer
The next line will contain positive integer
The final line will contain array
Output Specification
On a single line, output the sorted array with a single space between each number.
Subtasks
Subtask 1 [20%]
For 20% of the marks,
Subtask 2 [20%]
For an additional 20% of the marks,
Subtask 3 [60%]
No additional constraints.
Sample Input 1
4
4
68 19 14 62
Sample Output 1
68 14 62 19
Explanation for Sample Output 1
The first number is
Sample Input 2
8
4
1 18 21 27 17 4 4 16
Sample Output 2
4 4 16 1 17 21 18 27
Comments