Cod sursa(job #713257)
| Utilizator | Data | 14 martie 2012 13:50:05 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.43 kb |
#include <stdio.h>
#include <algorithm>
#include <vector>
using namespace std;
int n;
vector <int> V;
int main()
{
freopen ("algsort.in","r",stdin);
freopen ("algsort.out","w",stdout);
scanf("%d", &n);
int x;
for(int i=0;i<n;++i)
{
scanf("%d", &x);
V.push_back(x);
}
sort(V.begin(), V.end());
for(int i=0;i<n;i++)
printf("%d ", V[i]);
return 0;
}
