这道题就是给出一些数字,把他们排序输出,我直接用了set结构
#include <iostream>
#include <set>
using namespace std;
int main()
{
int n;
while(cin >> n){
set<int> nums;
int x;
for(int i = 0; i < n; ++i){
cin >> x;
nums.insert(x);
}
for(auto a : nums){
cout << a << endl;
}
}
}
这道题要求