Cod sursa(job #2609687)
| Utilizator | Data | 3 mai 2020 01:21:03 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
#include <iostream>
#include <vector>
#include <bits/stdc++.h>
#include <algorithm>
// #include <chrono>
using namespace std;
// Reference: http://www.cplusplus.com/reference/algorithm/nth_element/
ifstream f("algsort.in");
ofstream g("algsort.out");
long long int n, v[500001];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
f >> n;
for (int i = 0; i < n; i++)
f >> v[i];
sort(v, v + n);
for (int i = 0; i < n; i++)
g << v[i] << ' ';
return 0;
}
