Cod sursa(job #2426483)

Utilizator PopescuAndreiAlexandruPopescu Andrei Alexandru PopescuAndreiAlexandru Data 28 mai 2019 11:48:59
Problema Sortare prin comparare Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.34 kb
#include <iostream>
#include <fstream>
#include <algorithm>

using namespace std;

ifstream fin("algsort.in");
ofstream fout("algsort.out");

#define nmax 500005

long long v[nmax],n;

int main()
{
    fin>>n;
    for(int i=1;i<=n;i++)
        fin>>v[i];
    sort(v+1,v+1+n);
    for(int i=1;i<=n;i++)
        fout<<v[i]<<" ";
}