Mediumsortingarrays
Sort an Array
Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0
Statement
The first line contains n, the second line contains n integers. Print the numbers in non-decreasing order on one line separated by spaces.
Examples
Example 1
Input
5 3 1 2 5 4
Output
1 2 3 4 5
Example 2
Input
4 -1 -3 2 0
Output
-3 -1 0 2
Constraints
- 1 ≤ n ≤ 10^5
- -10^9 ≤ a_i ≤ 10^9