Cod sursa(job #2779705)
| Utilizator | Data | 4 octombrie 2021 19:17:00 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.41 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("algsort.in");
ofstream g("algsort.out");
#define cin f
#define cout g
const int Max = 5e5 + 1;
void nos()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
int a[Max];
int n;
int32_t main()
{
int n;
f>>n;
int i;
for(i=1;i<=n;i++)
f>>a[i];
sort(a+1,a+n+1);
for(i=1;i<=n;i++)
cout<<a[i]<<' ';
return 0;
}