Cod sursa(job #293833)
#include <stdio.h>
#include <deque>
#include <algorithm>
#include <limits.h>
//#include <mem.h>
//#include <value.h>
using namespace std;
int N, Mn, Pz;
deque <int> v;
int cmp(const int &x, const int &y)
{
return x < y;
}
int main()
{
freopen("algsort.in","r",stdin);
freopen("algsort.out","w",stdout);
scanf("%d",&N);
int i, x;
x = INT_MAX;
for (i = 0; i < N; i++)
{
scanf("%d",&x);
v.push_back(x);
}
sort(v.begin(), v.end(), cmp);
for (i = 0; i < N; i++)
{
printf("%d ",v[0]);
v.pop_front();
}
return 0;
}