Advertisement
noshin98

uva 11462

Oct 21st, 2016
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<algorithm>
  3. using namespace std;
  4. long long a[2000001],n,i;
  5. int main()
  6. {
  7.     while(scanf("%lld",&n)==1)
  8.     {
  9.         if(n==0)
  10.             break;
  11.         for(i=0;i<n;i++)
  12.  
  13.             scanf("%lld",&a[i]);
  14.             sort(a,a+i);
  15.             for(i=0;i<n;i++)
  16.             {
  17.                 printf("%lld",a[i]);
  18.                 if(i<n-1)
  19.                     printf(" ");
  20.  
  21.             }
  22.  
  23.             printf("\n");
  24.  
  25.     }
  26.     return (0);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement