Cod sursa(job #2949790)
Utilizator | Data | 1 decembrie 2022 18:16:11 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.35 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
vector <long long> v;
int main()
{
int n,i,x;
fin>>n;
for(i=1;i<=n;i++)
{
fin>>x;
v.push_back(x);
}
sort(v.begin(),v.end());
for(i=0;i<v.size();i++)
fout<<v[i]<<" ";
return 0;
}