提交记录 12326


用户 题目 状态 得分 用时 内存 语言 代码长度
Eqvpkbz 1001. 测测你的排序 Accepted 100 808.34 ms 781264 KB C++ 789 B
提交时间 评测时间
2020-03-22 16:12:34 2020-08-01 02:54:01
#define Inc(i, a, b) for(register int (i) = (a); (i) < (b); ++ (i))
#define Dec(i, a, b) for(register int (i) = (a) - 1; (i) >= (b); -- (i))
void sort(unsigned *a, int n) {
    int c[4][0x100], b[100000000];
    Inc(i, 0, n)
        ++ c[0][(a[i]      ) & 0xff],
        ++ c[1][(a[i] >>  8) & 0xff],
        ++ c[2][(a[i] >> 16) & 0xff],
        ++ c[3][(a[i] >> 24) & 0xff];

    Inc(i, 1, 0x100)
        c[0][i] += c[0][i - 1],
        c[1][i] += c[1][i - 1],
        c[2][i] += c[2][i - 1],
        c[3][i] += c[3][i - 1];

    Dec(i, n, 0)
        b[-- c[0][(a[i]      ) & 0xff]] = a[i];
    Dec(i, n, 0)
        a[-- c[1][(b[i] >>  8) & 0xff]] = b[i];
    Dec(i, n, 0)
        b[-- c[2][(a[i] >> 16) & 0xff]] = a[i];
    Dec(i, n, 0)
        a[-- c[3][(b[i] >> 24) & 0xff]] = b[i];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1808.34 ms762 MB + 976 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2026-03-26 06:30:37 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠