提交记录 61777


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_v41_0919 1001. 测测你的排序 Wrong Answer 0 176.542 ms 391660 KB C++17 600 B
提交时间 评测时间
2026-09-19 23:06:19 2026-09-19 23:06:24
// phase probe: only the fixed-stride top-byte scatter (deliberately WA)
#include <stdlib.h>
#include <string.h>
static unsigned fill[256];
void sort(unsigned *a, int n) {
    unsigned stride = (unsigned)((n + 255) / 256) + (unsigned)(n >> 9) + 4096;
    unsigned *tmp = (unsigned *)malloc((size_t)stride * 256u * 4u);
    if (!tmp) return;
    memset(fill, 0, sizeof(fill));
    for (int i = 0; i < n; i++) {
        unsigned v = a[i];
        unsigned b = v >> 24;
        tmp[(size_t)b * stride + fill[b]] = v;
        fill[b]++;
    }
    /* leave a untouched -> WA, we only want the timing */
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1176.542 ms382 MB + 492 KBWrong AnswerScore: 0


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