Type: Default 1000ms 256MiB

最小交换

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

输入n个数,要求找出n个数的最小值,并将最小的数与第一个数交换后,再输出。 如果最小值不止一个,那么让第一个最小值和第一个数交换。

Input Format

第一行:n n<=100 第二行:n个由空格隔开的整数。

Output Format

n个由空格隔开的整数,其中最小的数和第一个完成交换。

Sample

input

5
2 3 6 1 3

output

1 3 6 2 3

Hint

时间限制:1s1 \text {s}

20200810数组基本练习

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
12
Start at
2020-8-10 9:48
End at
2020-8-11 9:48
Duration
24 hour(s)
Host
Partic.
43