提交记录 12349


用户 题目 状态 得分 用时 内存 语言 代码长度
Eqvpkbz 1001. 测测你的排序 Compile Error 0 0 ns 0 KB C++ 486 B
提交时间 评测时间
2020-03-23 14:15:51 2020-08-01 02:54:04
unsigned b[100000000],*rs[D],cnt0[D],cnt1[D],cnt2[D],cnt3[D];
void sort(unsigned *a, int n){
    #define D 256
    #define D1 255
    
    #define cal(w,w2,tw,op)\
    p=w2-1;for(i=0;i<D;++i)rs[i]=p,p+=tw[i];\
    for(i=0;i<n;++i)p=w+i,*++rs[p[0]op]=p[0];

    register unsigned*p,i,x;

    for(i=0;i<n;++i)
        x=a[i],++cnt0[x&D1],++cnt1[x>>8&D1],++cnt2[x>>16&D1],++cnt3[x>>24];

    cal(a,b,cnt0,&D1);
    cal(b,a,cnt1,>>8&D1);
    cal(a,b,cnt2,>>16&D1);
    cal(b,a,cnt3,>>24);
}

CompilationN/AN/ACompile ErrorScore: N/A


Judge Duck Online | 评测鸭在线
Server Time: 2024-04-26 00:29:26 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用