Cod sursa(job #410523)

Utilizator toniobFMI - Barbalau Antonio toniob Data 4 martie 2010 14:10:30
Problema Sortare prin comparare Scor 100
Compilator cpp Status done
Runda Arhiva educationala Marime 0.37 kb
#include <fstream>
using namespace std;
#include <algorithm>
#include <vector>

ifstream in ( "algsort.in" );
ofstream out ( "algsort.out" );

int n;
long long v [ 5000000 ];

int main ()
{
	in >> n;
	
	for ( int i = 1; i <= n; ++i )
		in >> v [ i ];
	
	sort ( v + 1, v + 1 + n );
	
	for ( int i = 1; i <= n; ++i )
		out << v [ i ] << " ";
	
	return 0;
}