Cod sursa(job #2653065)
Utilizator | Data | 26 septembrie 2020 19:25:02 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.34 kb |
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
int main(int argc, char const *argv[])
{
ifstream fin("algsort.in");
ofstream fout("algsort.out");
int N; fin >> N;
vector<int> v(N);
for (auto &i : v)
fin >> i;
sort(v.begin(), v.end());
for (auto i : v)
fout << i << ' ';
fout << '\n';
return 0;
}