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