Cod sursa(job #756792)
| Utilizator | Data | 10 iunie 2012 14:23:52 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.41 kb |
#include <vector>
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int n;
int x[500005];
int main()
{
freopen ("algsort.in" , "r" , stdin);
freopen ("algsort.out" , "w" , stdout);
scanf ("%d" , &n);
for (int i = 1 ; i <= n ; i++)
scanf ("%d" , &x[i]);
sort(x + 1 , x + n + 1);
for (int i = 1 ; i <= n ; i++)
printf ("%d " , x[i]);
return 0;
}
