Pagini recente » Rating Grigore Diana (dyanag) | Rating Ionut Calofir (Ionut228) | Arhiva de probleme | Algoritmiada 2012 - Clasament Runda 3, Clasele 11-12 | Cod sursa (job #3294232)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
const int nMax = 5e5;
int n;
vector<int> v(nMax);
int main()
{
ios::sync_with_stdio(false);
fin.tie(nullptr);
fin >> n;
for(int i = 0; i < n; ++i)
{
fin >> v[i];
}
sort(v.begin(), v.begin() + n);
for(int i = 0; i < n; ++i)
{
fout << v[i] << " ";
}
fin.close();
fout.close();
return 0;
}