Last active
February 14, 2017 18:52
-
-
Save shohan4556/2a5d241d45e5ee265630 to your computer and use it in GitHub Desktop.
URI Online Judge | 1566 (Height) Solution in C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 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