#include<stdio.h>
#include <string.h>
int main(void)
{
int n,i,max;
int arr[n];
for(i
=0;i
<n
;i
++) scanf("%d",&arr
[i
]);
max=arr[0];
for(i=1;i<n;i++){
if(arr[i]>max) max=arr[i];
}
int count[max+1],o[n];
//memset(count,0,(max+1)*sizeof(count[0]));
for(i=0;i<max+1;i++) count[i]=0;
for(i=0;i<n;i++) count[arr[i]]++;
for(i=1;i<max+1;i++) count[i]=count[i]+count[i-1];
for(i=0;i<n;i++){
o[count[arr[i]]-1]=arr[i];
count[arr[i]]--;
}
for(i
=0;i
<n
;i
++) printf("%d ",o
[i
]);
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKaW50IG1haW4odm9pZCkKewoJaW50IG4saSxtYXg7CgkKCXNjYW5mKCIlZCIsJm4pOwoJCglpbnQgYXJyW25dOwoJCglmb3IoaT0wO2k8bjtpKyspIHNjYW5mKCIlZCIsJmFycltpXSk7CgkKCW1heD1hcnJbMF07CgkKCWZvcihpPTE7aTxuO2krKyl7CgkJaWYoYXJyW2ldPm1heCkgbWF4PWFycltpXTsKCX0KCQoJaW50IGNvdW50W21heCsxXSxvW25dOwoJCgkvL21lbXNldChjb3VudCwwLChtYXgrMSkqc2l6ZW9mKGNvdW50WzBdKSk7CgkKCWZvcihpPTA7aTxtYXgrMTtpKyspIGNvdW50W2ldPTA7CgkKCWZvcihpPTA7aTxuO2krKykgY291bnRbYXJyW2ldXSsrOwoJCglmb3IoaT0xO2k8bWF4KzE7aSsrKSBjb3VudFtpXT1jb3VudFtpXStjb3VudFtpLTFdOwoJCQoJZm9yKGk9MDtpPG47aSsrKXsKCQlvW2NvdW50W2FycltpXV0tMV09YXJyW2ldOwoJCWNvdW50W2FycltpXV0tLTsKCX0KCQoJZm9yKGk9MDtpPG47aSsrKSBwcmludGYoIiVkICIsb1tpXSk7CgkKCXJldHVybiAwOwp9Cg==