#include <cstring>
void sort(unsigned int *sort_l,int sort_n) {
static unsigned int sort_c[256],*sort_r=sort_l+sort_n,*sort_x=new unsigned int[sort_n];
memset(sort_c,0,sizeof(sort_c));
for (unsigned int *i=sort_l;i<sort_r;++i) ++sort_c[(*i)&255];
for (unsigned int i=1;i<256;++i) sort_c[i]+=sort_c[i-1];
for (unsigned int *i=sort_r-1;i>=sort_l;--i) sort_x[--sort_c[(*i)&255]]=*i;
memcpy(sort_l,sort_x,(sort_r-sort_l)*sizeof(unsigned int));
memset(sort_c,0,sizeof(sort_c));
for (unsigned int *i=sort_l;i<sort_r;++i) ++sort_c[((*i)>>8)&255];
for (unsigned int i=1;i<256;++i) sort_c[i]+=sort_c[i-1];
for (unsigned int *i=sort_r-1;i>=sort_l;--i) sort_x[--sort_c[((*i)>>8)&255]]=*i;
memcpy(sort_l,sort_x,(sort_r-sort_l)*sizeof(unsigned int));
memset(sort_c,0,sizeof(sort_c));
for (unsigned int *i=sort_l;i<sort_r;++i) ++sort_c[((*i)>>16)&255];
for (unsigned int i=1;i<256;++i) sort_c[i]+=sort_c[i-1];
for (unsigned int *i=sort_r-1;i>=sort_l;--i) sort_x[--sort_c[((*i)>>16)&255]]=*i;
memcpy(sort_l,sort_x,(sort_r-sort_l)*sizeof(unsigned int));
memset(sort_c,0,sizeof(sort_c));
for (unsigned int *i=sort_l;i<sort_r;++i) ++sort_c[((*i)>>24)&255];
for (unsigned int i=1;i<256;++i) sort_c[i]+=sort_c[i-1];
for (unsigned int *i=sort_r-1;i>=sort_l;--i) sort_x[--sort_c[((*i)>>24)&255]]=*i;
memcpy(sort_l,sort_x,(sort_r-sort_l)*sizeof(unsigned int));
}