Cod sursa(job #2998368)
Utilizator | Data | 9 martie 2023 12:41:38 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.31 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ifstream fin("algsort.in");
ofstream fout("algsort.out");
int n;
fin >> n;
vector<int> v(n);
for (int &x : v)
fin >> x;
sort(v.begin(), v.end());
for (int x : v)
fout << x << ' ';
fout << '\n';
fin.close();
fout.close();
return 0;
}