Cod sursa(job #712577)
Utilizator | Data | 13 martie 2012 16:39:54 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 40 |
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[50000];
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;
}