快速排序 题解:
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
int n,a[100000];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
for (int i = 0; i < n; i++) {
cout << a[i] << " ";
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发