Pagini recente » Cod sursa (job #2069466) | Cod sursa (job #3224178) | Cod sursa (job #2300596) | Cod sursa (job #1639950) | Cod sursa (job #1519851)
#include <cstdio>
#include <algorithm>
using namespace std;
FILE *f = fopen ( "algsort.in" , "r" ) , *g = fopen ( "algsort.out" , "w" );
const int MAX = 500005;
int Size , myInts [ MAX ] , i;
void read()
{
fscanf ( f , "%d" , &Size );
for ( i = 0 ; i < Size ; i ++ )
fscanf ( f , "%d" , &myInts [ i ] );
}
void print()
{
for ( i = 0 ; i < Size ; i ++ )
fprintf ( g , "%d " , myInts [ i ] );
}
int main()
{
read();
sort ( myInts , myInts + Size );
print();
return 0;
}