Pagini recente » Cod sursa (job #2004381) | Cod sursa (job #2383364) | Cod sursa (job #2726940) | Cod sursa (job #2088876) | Cod sursa (job #1624048)
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
ifstream fin ("algsort.in");
ofstream fout ("algsort.out");
const int nmax = 500005;
int v[nmax];
int main()
{
ios_base::sync_with_stdio(false);
int n, i;
fin >> n;
for(i=1; i<=n; i++)
fin >> v[i];
sort(v+1, v+n+1);
for(i=1; i<=n; i++)
fout << v[i] << " ";
fin.close();
fout.close();
return 0;
}