fork(1) download
  1. #include <stdio.h>
  2. #include<limits.h>
  3. typedef long int l;
  4. int main(void) {
  5. l min=LONG_MAX,max=LONG_MIN,n,a[1000006]={0},i,j;
  6. scanf("%ld",&n);
  7. for(i=0;i<n;i++)
  8. {
  9. scanf("%ld",&j);
  10. if(j<min)min=j;
  11. if(j>max)max=j;
  12. a[j]++;
  13. }
  14. for(i=min;i<=max;i++)
  15. {
  16. while(a[i])
  17. {
  18. printf("%ld\n",i);
  19. a[i]--;
  20. }
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0s 6080KB
stdin
Standard input is empty
stdout
Standard output is empty