Cod sursa(job #643912)
Utilizator | Data | 4 decembrie 2011 17:42:17 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.37 kb |
#include<stdio.h>
#include<algorithm>
#define Nmax 500010
using namespace std ;
int V[Nmax], i, N ;
int main ()
{
freopen("algsort.in","r",stdin);
freopen("algsort.out","w",stdout);
scanf("%d",&N);
for( i = 1 ; i <= N ; i++ )
scanf("%d",&V[i]);
sort(V+1,V+N+1);
for( i = 1 ; i <= N ; i++ )
printf("%d ",V[i]);
return 0 ;
}