Cod sursa(job #2617845)

Utilizator matthriscuMatei Hriscu matthriscu Data 23 mai 2020 00:28:20
Problema Sortare prin comparare Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.33 kb
#include <fstream>
#include <algorithm>

int main() {
    int n, v[500005], i;
    freopen("algsort.in", "r", stdin);
    freopen("algsort.out", "w", stdout);
    scanf("%d", &n);
    for(i = 1; i <= n; ++i)
        scanf("%d", &v[i]);
    std::sort(v+1, v+n+1);
    for(i = 1; i <= n; ++i)
        printf("%d ", v[i]);
}