80分,第二个点wa
#include <bits/stdc++.h>
using namespace std;
long long n,m,t,ans,a[1000005] = {0};
int main(){
cin>>n>>m;
for (int i = 1; i <= m; i ++){
cin>>t;
a[t] += 1;
}
for (int i = 1; i <= m; i ++){
if (a[i] >= 1){
for (int j = 1; j <= a[i]; j ++){
cout<<i<<" ";
}
}
}
return 0;
}