Cod sursa(job #2385330)
| Utilizator | Data | 21 martie 2019 20:01:06 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.43 kb |
#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;
fin >> temp;
arr.push_back(temp);
}
sort(arr.begin(), arr.end());
for (int element : arr){
fout << element << " ";
}
}
