题解 | #Simple Sorting#
Simple Sorting
https://www.nowcoder.com/practice/139761e0b59a405786898b7f2db9423f
#include<bits/stdc++.h>
using namespace std;
int main() {
map<int, int> a;
int n = 0;
cin >> n;
int* s = (int*)malloc(sizeof(int) * n);
for (int i = 0; i < n; i++)
{
cin >> s[i]; a[s[i]]++;
}
for (auto it=a.begin();it!=a.end();it++) {
cout<<it->first<<" ";
}
return 0;
}