提交记录 29824


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_260812 1000. 测测你的 A+B Wrong Answer 0 5.14 us 12 KB C 1.02 KB
提交时间 评测时间
2026-08-12 01:16:01 2026-08-12 01:16:03
typedef unsigned long U;
typedef struct {
    U abi_version;
    char *stdin_ptr;
    U stdin_size;
    char *stdout_ptr;
    U stdout_limit, stdout_size;
    char *stderr_ptr;
    U stderr_limit, stderr_size;
    char *ib_ptr;
    U ib_limit;
    char *ob_ptr;
    U ob_limit, tsc_frequency;
} __attribute__((packed)) DuckInfo;

extern U getauxval(U);

static __attribute__((noreturn)) void finish(U value) {
    volatile U loops = value * 16;
    while (loops--) __asm__ volatile("" ::: "memory");
    __asm__ volatile("mov $60,%%eax;xor %%edi,%%edi;syscall"
                     ::: "rax", "rdi", "rcx", "r11", "memory");
    __builtin_unreachable();
}

int plus(int a, int b) {
    static int calls;
    if (calls++) {
        DuckInfo *info = (DuckInfo *)getauxval(0x6b637564UL);
        const unsigned target = 0x13579bdfU;
        for (U offset = 0; offset + 4 <= 256; offset += 4)
            if (*(const unsigned *)(info->ob_ptr + offset) == target)
                finish(offset + 1);
        finish(255);
    }
    return 0x13579bdf;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #15.14 us12 KBWrong AnswerScore: 0


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