提交记录 21018


用户 题目 状态 得分 用时 内存 语言 代码长度
Saisyc 1001a. 测测你的排序2 Runtime Error 0 5.05 us 8 KB C++14 1.37 KB
提交时间 评测时间
2024-01-29 20:22:52 2024-01-29 20:22:54
void sort(unsigned *a, int n) {
    asm (
        "        xor     %%rax, %%rax                  \n"
        "LABEL0:                                       \n"
        "        sub     %1, 1                         \n"
        "        test    %1, %1                        \n"
        "        jle     LABEL1                        \n"
        "LABEL5:                                       \n"
        "        xor     %%eax, %%eax                  \n"
        "LABEL4:                                       \n"
        "        mov     %%edx, 0(%0, %%rax, 4)        \n"
        "        mov     %%ecx, 4(%0, %%rax, 4)        \n"
        "        cmp     %%edx, %%ecx                  \n"
        "        jle     LABEL3                        \n"
        "        mov     0(%0, %%rax, 4), %%ecx        \n"
        "        mov     4(%0, %%rax, 4), %%edx        \n"
        "LABEL3:                                       \n"
        "        add     %%rax, 1                      \n"
        "        cmp     %1, %%eax                     \n"
        "        jg      LABEL4                        \n"
        "        sub     %1, 1                         \n"
        "        jne     LABEL5                        \n"
        "LABEL1:                                       \n"
        "        ret                                   \n"
        :
        :
        "r"(a),
        "r"(n)
    );
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #15.05 us8 KBRuntime ErrorScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2025-07-21 17:19:17 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠