-->
当前位置:首页 > 题库

PROGRAMMING:Select sort exercise

Luz5年前 (2021-05-10)题库369
Enter n data. Using the selection sort programming, the output of the k-th round of sorting sequence.
###Input format:
Each test contains two lines, which are integer n, K (0 < = k < n < 100), and N original data.
###Output format:
Output the sequence result after the k-th round of sorting (1 space between data, no extra space at the end).
###Input example:
```in
6 3
3 5 1 2 8 6
4 3
9 8 7 6
5 0
4 3 2 9 7
```
###Output example:
```out
1 2 3 5 8 6
6 7 8 9
4 3 2 9 7
```







answer:If there is no answer, please comment