Pagini recente » Cod sursa (job #1039175) | Cod sursa (job #864738) | Cod sursa (job #2190012) | Cod sursa (job #1466262) | Cod sursa (job #2530717)
#include <bits/stdc++.h>
using namespace std;
//ifstream f("aib.in");
//ofstream g("aib.out");
const int N = 500010;
const int buffSize = 100000;
char buff[buffSize+10];
int pb=0;
void inc()
{
pb++;
if(pb==buffSize)
{
pb=0;
fread(buff,1,buffSize,stdin);
}
}
void readInt(int &x)
{
while(buff[pb]<'0'||buff[pb]>'9')inc();
x=0;
while(buff[pb]>='0'&&buff[pb]<='9')
{
x=10*x+buff[pb]-'0';
inc();
}
}
int n,a[N];
int main()
{
freopen("algsort.in","r",stdin);
freopen("algsort.out","w",stdout);
readInt(n);
for(int i=1;i<=n;i++)
readInt(a[i]);
sort(a+1,a+n+1);
for(int i=1;i<=n;i++)
printf("%d ",a[i]);
return 0;
}