提交记录 120121


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_6a_agg3 noip17a. 【NOIP2017】小凯的疑惑 Accepted 100 2.6 us 8 KB C++17 1.74 KB
提交时间 评测时间
2026-10-02 17:45:15 2026-10-02 17:45:19
/*
References:
[1] jiegec, https://duck.ac/submission/48022.
Reuse the public solution implementation and its existing attribution comments
below, including input decoding, direct DuckInfo output and any fixed answer table.
No separate license is declared on the public source; retain its attribution.
Idea: Initial verification of the attributed fastest known implementation on
this account. No additional algorithmic change is claimed.
Purpose: Check correctness and whether its runtime satisfies the exact target,
stopping work immediately if it does.
*/
// This code is AI-generated. (AI 生成的代码)
// NOIP2017 小凯的疑惑: largest non-representable value with coprime a,b is
// a*b-a-b.  Read a,b from DuckInfo and print it directly.
typedef unsigned long long u64;
struct DuckInfo {
    u64 abi;
    const char *in; u64 in_size;
    char *out; u64 out_limit; u64 out_size;
    char *err; u64 err_limit; u64 err_size;
    const char *ib; u64 ib_limit;
    char *ob; u64 ob_limit; u64 tsc;
} __attribute__((packed));

int main(void) { return 0; }

extern "C" void __libc_start_main(int (*mf)(int, char **, char **), int ac, char **av) {
    (void)mf;
    struct DuckInfo *d = (struct DuckInfo *)((u64 *)av)[29];
    const char *s = d->in;
    u64 a = 0, b = 0;
    while (*s != ' ') a = a * 10 + (u64)(*s++ - '0');
    ++s;
    while (*s >= '0' && *s <= '9') b = b * 10 + (u64)(*s++ - '0');
    u64 r = a * b - a - b;
    char *o = d->out, *st = o;
    do { *o++ = (char)('0' + r % 10); r /= 10; } while (r);
    *o++ = '\n';
    char *e = o - 2;
    while (st < e) { char t = *st; *st = *e; *e = t; ++st; --e; }
    d->out_size = (u64)(o - d->out);
    __asm__ volatile("mov $60,%%eax; xor %%edi,%%edi; syscall" ::: "rax","rdi","rcx","r11","memory");
    __builtin_unreachable();
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #12.6 us8 KBAcceptedScore: 5

Testcase #22.49 us8 KBAcceptedScore: 5

Testcase #32.47 us8 KBAcceptedScore: 5

Testcase #42.48 us8 KBAcceptedScore: 5

Testcase #52.48 us8 KBAcceptedScore: 5

Testcase #62.18 us8 KBAcceptedScore: 5

Testcase #72.19 us8 KBAcceptedScore: 5

Testcase #82.21 us8 KBAcceptedScore: 5

Testcase #92.56 us8 KBAcceptedScore: 5

Testcase #102.55 us8 KBAcceptedScore: 5

Testcase #112.26 us8 KBAcceptedScore: 5

Testcase #122.56 us8 KBAcceptedScore: 5

Testcase #132.25 us8 KBAcceptedScore: 5

Testcase #142.59 us8 KBAcceptedScore: 5

Testcase #152.2 us8 KBAcceptedScore: 5

Testcase #162.59 us8 KBAcceptedScore: 5

Testcase #172.23 us8 KBAcceptedScore: 5

Testcase #182.59 us8 KBAcceptedScore: 5

Testcase #192.22 us8 KBAcceptedScore: 5

Testcase #202.58 us8 KBAcceptedScore: 5


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