#P1177. 【模板】排序

【模板】排序

Description

Sort the NN input numbers in ascending order and output them.

Input Format

The first line contains a positive integer NN.

The second line contains NN space-separated positive integers aia_i, which are the numbers you need to sort.

Output Format

Output the given NN numbers in ascending order, separated by spaces. The line should end with a newline character and have no trailing space.

5
4 2 4 5 1
1 2 4 4 5

Hint

For 20%20\% of the testdata, 1N1031 \leq N \leq 10^3.

For 100%100\% of the testdata, 1N1051 \leq N \leq 10^5, 1ai1091 \le a_i \le 10^9.

Translated by ChatGPT 5