Cod sursa(job #3333144)
| Utilizator | Data | 11 ianuarie 2026 14:22:13 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.44 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
vector<int> v;
int main() {
ios::sync_with_stdio(false);
int n;
fin >> n;
for(int i = 0, x; i < n; i++) {
fin >> x;
v.push_back(x);
}
sort(v.begin(), v.end());
for(const int& i: v) {
fout << i << " ";
}
fin.close();
fout.close();
return 0;
}