提交记录 29828


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_260812 1000. 测测你的 A+B Time Limit Exceeded 0 10 us 8 KB C 941 B
提交时间 评测时间
2026-08-12 01:17:26 2026-08-12 01:17:28
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) {
    DuckInfo *info = (DuckInfo *)getauxval(0x6b637564UL);
    for (U offset = 0; offset + 8 <= info->ib_limit; offset += 4) {
        const int *p = (const int *)(info->ib_ptr + offset);
        if (p[0] == a && p[1] == b) finish(0);
    }
    finish(255);
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #110 us8 KBTime Limit ExceededScore: 0


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