Pagini recente » Cod sursa (job #1903967) | Cod sursa (job #913524) | Statistici SzekelyRaul (raul_Blz) | Cod sursa (job #3312723) | Cod sursa (job #2385327)
#include <algorithm>
#include <fstream>
#include <iostream>
#include <vector>
using namespace std;
vector <int> arr;
int n;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
int main(){
fin >> n;
for (; n; n--){
int temp;
cin >> temp;
arr.push_back(temp);
}
sort(arr.begin(), arr.end());
for (int element : arr){
fout << element << " ";
}
}