Cod sursa(job #2932140)
| Utilizator | Data | 1 noiembrie 2022 23:07:35 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.54 kb |
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
cin >> n;
vector <int> v(n);
for (int &x : v)
cin >> x;
sort(v.begin(), v.end());
for (int x : v)
cout << x << ' ';
cout << '\n';
}
int main() {
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
freopen("algsort.in", "r", stdin);
freopen("algsort.out", "w", stdout);
int t = 1;
// cin >> t;
while (t--)
solve();
return 0;
}
