提交记录 31384


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_260814 1001. 测测你的排序 Wrong Answer 0 96.247 ms 261132 KB C 480 B
提交时间 评测时间
2026-08-14 01:48:45 2026-08-14 01:48:49
// Reveal top byte of max via memory: touch (max>>24) MB.
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[255 * 1048576]; // up to 255 MB
    unsigned mb = mx >> 24;              // 0..255
    if (mb > 255) mb = 255;
    unsigned long long bytes = (unsigned long long)mb * 1048576ull;
    for (unsigned long long p = 0; p < bytes; p += 4096) scratch[p] = 1;
    a[0] = mx;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #196.247 ms255 MB + 12 KBWrong AnswerScore: 0


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