Pagini recente » Cod sursa (job #366688) | Cod sursa (job #1997847) | Cod sursa (job #3148771) | Cod sursa (job #2780971) | Cod sursa (job #1411768)
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
using namespace std ;
ifstream f ("algsort.in") ;
ofstream g ("algsort.out") ;
// Intro Sort
vector<int> V ;
int main ()
{
register int n , x ;
f >> n ;
for ( int i = 0 ; i < n ; ++i )
{
f >> x ;
V.push_back(x) ;
}
sort ( V.begin() , V.end() ) ;
for ( vector<int> :: iterator I = V.begin() ; I != V.end() ; ++I )
g << *I << " " ;
return 0 ;
}