Pagini recente » Cod sursa (job #736209) | Cod sursa (job #3228142) | Cod sursa (job #395310) | Cod sursa (job #682567) | Cod sursa (job #2609687)
#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;
}