P1177 【Template】Sorting
Description
Sort the $N$ input numbers in ascending order and output them.
Input Format
The first line contains a positive integer $N$.
The second line contains $N$ space-separated positive integers $a_i$, which are the numbers you need to sort.
Output Format
Output the given $N$ numbers in ascending order, separated by spaces. The line should end with a newline character and have no trailing space.
Explanation/Hint
For $20\%$ of the testdata, $1 \leq N \leq 10^3$.
For $100\%$ of the testdata, $1 \leq N \leq 10^5$, $1 \le a_i \le 10^9$.
Translated by ChatGPT 5