Cod sursa(job #2863097)
Utilizator | Data | 6 martie 2022 12:39:30 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.46 kb |
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <stack>
#define NMAX 2000005
using namespace std;
ifstream fin ("algsort.in");
ofstream fout ("algsort.out");
int n;
vector <int> v;
int main()
{
fin >> n;
for(int i=0;i<n;++i)
{
int x;
fin >> x;
v.push_back(x);
}
sort(v.begin(),v.end());
for(int i=0;i<v.size();++i)
fout << v[i] << " ";
return 0;
}