Cod sursa(job #2397682)
Utilizator | Data | 4 aprilie 2019 18:01:37 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.27 kb |
#include <fstream>
#include <algorithm>
using namespace std;
int v[500013],n;
int main()
{
ifstream f("algsort.in");
ofstream g("algsort.out");
f>>n;
for(int i=0;i<n;++i) f>>v[i];
sort(v,v+n);
for(int i=0;i<n;++i) g<<v[i]<<" ";
return 0;
}