Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shohan4556/2a5d241d45e5ee265630 to your computer and use it in GitHub Desktop.
Save shohan4556/2a5d241d45e5ee265630 to your computer and use it in GitHub Desktop.
URI Online Judge | 1566 (Height) Solution in C++
/// Author : shohanur Rahaman
///Problem level : easy
/// URI : 1566
#include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int array[3000000]={0};
int tc,n;
int i;
scanf("%d",&tc);
while(tc--){
scanf("%d",&n);
for(int j=0;j<n;j++){
scanf("%d",&array[j]);
}
sort(array,array+n);
for(i=0;i<n-1;i++)
printf("%d ",array[i]);
printf("%d",array[n-1]);
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment