Cod sursa(job #2922522)
Utilizator | Data | 8 septembrie 2022 19:26:52 | |
---|---|---|---|
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");
int main(){
ios_base::sync_with_stdio(false);
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 << " ";
}
}