Cod sursa(job #2255339)
| Utilizator | Data | 6 octombrie 2018 18:59:58 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.45 kb |
#include <iostream>
#include <algorithm>
#include <fstream>
const int MAXN = 5e5 + 5;
using namespace std;
ifstream in("algsort.in");
ofstream out("algsort.out");
int v[MAXN],n;
int main()
{
in.tie(nullptr);
out.tie(nullptr);
ios::sync_with_stdio(false);
in>>n;
for(int i = 1; i <= n; i++)
in>>v[i];
sort(v + 1,v + n + 1);
for(int i = 1; i <= n; i++)
out<<v[i]<<" ";
return 0;
}
