Cod sursa(job #2999117)
| Utilizator | Data | 10 martie 2023 15:21:49 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.48 kb |
#include <bits/stdc++.h>
using namespace std;
#define fastread ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
ifstream fin("algsort.in");
ofstream fout("algsort.out");
const int maxn = 5e5;
int n;
vector<int> a;
void read(){
fin >> n;
for(int i = 1; i <= n; ++i){
int x; fin >> x;
a.push_back(x);
}
}
int main(){
fastread;
read();
sort(a.begin(), a.end());
for(auto x : a)
fout << x << " ";
return 0;
}