Cod sursa(job #3195945)
Utilizator | Data | 22 ianuarie 2024 11:55:13 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.32 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
vector <int> v;
int main()
{
int n,e;
fin >> n;
while(n--){
fin >> e;
v.push_back(e);
}
sort(v.begin(), v.end());
for(auto x : v) fout << x << " ";
return 0;
}