提交记录 936
提交时间 |
评测时间 |
2018-06-20 17:49:15 |
2020-07-31 20:44:38 |
unsigned b[100000000], c0[256], c1[256], c2[256], c3[256];
unsigned *pos[256];
#define gao(cnt,op) \
int sum=-1;\
for (i=0;i<256;++i) pos[i]=B+sum, sum+=cnt[i];\
unsigned *now=A;\
for (i=0;i<n;i+=4,now+=4){\
*(++pos[A[i] op])=*now;\
*(++pos[A[i+1] op])=now[1];\
*(++pos[A[i+2] op])=now[2];\
*(++pos[A[i+3] op])=now[3];\
}\
T=A; A=B; B=T;
void songsongsong(unsigned *a,unsigned n){
{
register unsigned i;
for (i=0;i<n;++i){
++c0[a[i]&255];
++c1[a[i]>>8&255];
++c2[a[i]>>16&255];
++c3[a[i]>>24&255];
}
}
unsigned *A=a, *B=b, *T;
{
register unsigned i;
gao(c0,&255);
}
{
register unsigned i;
gao(c1,>>8&255);
}
{
register unsigned i;
gao(c2,>>16&255);
}
{
register unsigned i;
gao(c3,>>24&255);
}
}
void sort(unsigned *a, int n)
{
songsongsong(a,n);
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 797.879 ms | 762 MB + 980 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-24 00:29:58 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠