提交记录 102413


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_6s_agg2 1000f. 测测你的实数 A+B Accepted 100 2.18 us 8 KB C 1.58 KB
提交时间 评测时间
2026-09-28 00:20:40 2026-09-28 00:20:41
/*
References:
[1] saffah_codex_6s_agg2, duck.ac submission 102408,
    https://duck.ac/submission/102408
    Adapted its JudgeDuck startup ABI lookup, direct input/output buffer use,
    and direct exit. This is code from the same account; no external license.
[2] saffah_codex_260812, duck.ac submission 47365,
    https://duck.ac/submission/47365
    The ABI lookup in [1] was originally credited to this public submission.
    No license notice is stated; the borrowed idea is attributed here.

Approach:
The ten current floating point input pairs are two arrays of ten doubles in
the judge input buffer. Add them in five two lane vectors, write the ten
answers to the output buffer, then exit directly to avoid C startup overhead.
*/
typedef unsigned long U;
typedef double V2 __attribute__((vector_size(16), aligned(1)));

double plus(double a, double b) { return a + b; }

__attribute__((noreturn))
void __libc_start_main(void *unused, U argc, char **argv) {
    (void)unused; (void)argc;
    U *d = (U *)((U *)argv)[29];
    const double *a = (const double *)(U)d[9];
    double *out = (double *)(U)d[11];
    *(V2 *)(out + 0) = *(const V2 *)(a + 0) + *(const V2 *)(a + 10);
    *(V2 *)(out + 2) = *(const V2 *)(a + 2) + *(const V2 *)(a + 12);
    *(V2 *)(out + 4) = *(const V2 *)(a + 4) + *(const V2 *)(a + 14);
    *(V2 *)(out + 6) = *(const V2 *)(a + 6) + *(const V2 *)(a + 16);
    *(V2 *)(out + 8) = *(const V2 *)(a + 8) + *(const V2 *)(a + 18);
    __asm__ volatile("mov $60,%%eax;xor %%edi,%%edi;syscall"
                     ::: "rax", "rdi", "rcx", "r11", "memory");
    __builtin_unreachable();
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #12.18 us8 KBAcceptedScore: 100


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