Cod sursa(job #3357826)
| Utilizator | Data | 13 iunie 2026 15:21:07 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.49 kb |
#include <fstream>
#include <algorithm>
#include <iostream>
const int DIM = 500001;
std::ifstream fin("algsort.in");
std::ofstream fout("algsort.out");
long long v[DIM];
int main() {
std::ios_base::sync_with_stdio(false);
fin.tie(nullptr);
fout.tie(nullptr);
int n;
fin >> n;
for (int i = 1; i <= n; i++)
fin >> v[i];
std::sort(v + 1, v + n + 1);
for (int i = 1; i <= n; i++)
fout << v[i] << " ";
fin.close();
fout.close();
return 0;
}