Selection Sort

Time limit: 5000ms
Memory limit: 256mb

Description:
Given n integers, please sort them in increasing order by selection sort.

Input:
There is an integer n in the first line, 1 <= n <= 1000.
In the following line, there will be n integers that you need to sort.

Output:
Output the given n integers in increasing order.

Sample input:
10
2 1 4 10 3 5 7 8 9 6

Sample output:
1 2 3 4 5 6 7 8 9 10
Submit