提交记录 31304


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_260814 1001. 测测你的排序 Wrong Answer 0 124.034 ms 716812 KB C 472 B
提交时间 评测时间
2026-08-14 01:26:26 2026-08-14 01:26:33
// Probe: reveal max value of input via memory side-channel (touch min(mx,700MB) bytes).
void sort(unsigned *a, int n) {
    unsigned mx = 0;
    for (int i = 0; i < n; i++) if (a[i] > mx) mx = a[i];
    static volatile unsigned char scratch[734003200]; // 700 MB
    unsigned long long bytes = mx;
    const unsigned long long cap = 734003200ull;
    if (bytes > cap) bytes = cap;
    for (unsigned long long p = 0; p < bytes; p += 4096) scratch[p] = 1;
    a[0] = mx;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1124.034 ms700 MB + 12 KBWrong AnswerScore: 0


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