Problem C: 选择排序2

Problem C: 选择排序2

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

输入n(n小于等于100)和 n个0到100000000的整数,然后将这些数字从大到小排序。换行后输出交换次数

#include <iostream>
using namespace std;
______ int maxn = 110; // 定义一个常量
int a[_____], n; // 使用 maxn 常量
int main() {
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> a[i];

// 请尝试独立完成这两重循环。


    for (int i = 1; i <= n; i++)
        cout << a[i] << " ";
    return 0;
}

Sample Input Copy

5
111111 222222222 3 0 100

Sample Output Copy

222222222 111111 100 3 0
3