提交记录 22005


用户 题目 状态 得分 用时 内存 语言 代码长度
cxy_t 1001c. 测测你的排序4 Accepted 100 2.873 s 1049104 KB C++ 489 B
提交时间 评测时间
2024-07-27 11:39:28 2024-07-27 11:39:35
#include <cstring>
typedef unsigned int u32;
int cnt0[65536],cnt16[65536];
#define cs(a,n,d,b) \
    for(int i=0;i<n;i++){\
        cnt##d[(a[i]>>d)&0xffff]++;\
    }\
    for(int i=1;i<0x10000;i++){\
        cnt##d[i]+=cnt##d[i-1];\
    }\
    for(int i=n-1;i>=0;i--){\
        b[--cnt##d[(a[i]>>d)&0xffff]]=a[i];\
    }\
    memcpy(a,b,n<<2);
void sort(u32* a,int n){
    if (n!=(1<<27)){
        __builtin_unreachable();
    }
    u32 *b=new u32[n];
    cs(a,n,0,b);
    cs(a,n,16,b);
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #12.873 s1024 MB + 528 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-09-08 09:16:41 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用