Cod sursa(job #1581823)
| Utilizator | Data | 27 ianuarie 2016 10:33:31 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.49 kb |
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int n , i, x ;
vector < int > v;
int main()
{
freopen("algsort.in","r",stdin);
freopen("algsort.out","w",stdout);
scanf("%d",&n);
for ( ; n-- ; )
{
scanf("%d",&x);
v.push_back(x);
}
sort(v.begin() , v.end());
for ( vector < int > ::iterator i = v.begin(); i != v.end() ; i++ )
printf( "%d ", (*i) ) ;
return 0;
}
