給 n 個數字,對他們排序
評分結果(參考) : AC (8ms, 860KB)
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
while(cin >> n){
vector<int> a(n);
for(int& i : a) cin >> i;
sort(a.begin(), a.end());
for(int i : a) cout << i << " ";
cout << "\n";
}
return 0;
}