1809: 【CSP数组】换位置▅
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:8
Solved:5
Description
体育课上,有一个班级的同学站成了一队,体育老师请最高的和最矮的两位同学调换一下位置,其余的同学不要动,请编程实现!(假设所有人的高矮都是不一样的)
Input
第一行有一个整数 n 代表该班级的总人数( n≤100 );
第二行有 n 个数,代表每个人的身高。
Output
调换位置后的结果。
Sample Input Copy
6
1 9 7 6 8 3
Sample Output Copy
9 1 7 6 8 3