Cod sursa(job #1309634)
Utilizator | Data | 5 ianuarie 2015 21:44:01 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include <stdio.h>
#include <algorithm>
using namespace std;
int main() {
freopen("algsort.in", "r", stdin);
freopen("algsort.out", "w", stdout);
int n;
scanf("%d", &n);
int *v = new int[n];
for (int i = 1; i <= n; ++i)
scanf("%d", &v[i]);
sort(v + 1, v + n + 1);
for (int i = 1; i <= n; ++i)
printf("%d ", v[i]);
return 0;
}