Pagini recente » Cod sursa (job #672796) | Cod sursa (job #789073) | Cod sursa (job #956626) | Monitorul de evaluare | Cod sursa (job #293727)
Cod sursa(job #293727)
#include <cstdio>
#include <algorithm>
using namespace std;
int v[1000005];
int cmp(const int &a, const int &b)
{
return a < b;
}
int main()
{
int a, b;
freopen("algsort.in","r",stdin);
freopen("algsort.out","w",stdout);
scanf("%d",&a);
for (b = 0; b < a; b++) scanf("%d",v + b);
sort(b, b + a, cmp);
for (b = 0; b < a; b++) printf("%d ",v[b]);
return 0;
}