Cod sursa(job #3365638)
| Utilizator | Data | 22 septembrie 2026 21:30:08 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.46 kb |
#include <bits/stdc++.h>
void solve()
{
int n;
std::cin >> n;
std::vector<int> a(n);
for (auto &c : a) {
std::cin >> c;
}
std::sort(a.begin(), a.end());
for (auto &c : a) {
std::cout << c << ' ';
}
}
signed main(void)
{
freopen("algsort.in", "r", stdin);
freopen("algsort.out", "w", stdout);
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int tt = 1;
while (tt--) {
solve();
}
}