Cod sursa(job #712578)
Utilizator | Data | 13 martie 2012 16:40:38 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.34 kb |
#include<algorithm>
#include <fstream>
using namespace std;
fstream fin("algsort.in",ios::in),fout("algsort.out",ios::out);
int main()
{
long long n,i,x[500001];
fin>>n;
for (i=0;i<=n-1;i++)
{
fin>>x[i];
}
sort(x,x+n);
for (i=0;i<=n-1;i++)
{
fout<<x[i]<<" ";
}
return 0;
fin.close();
fout.close();
return 0;
}