提交记录 53164


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_v41_0919 wc2017b3. 【WC2017】挑战-任务3 Runtime Error 0 7.75 us 32 KB C++17 1.24 KB
提交时间 评测时间
2026-09-19 18:40:32 2026-09-19 18:40:34
// marker diagnostic: reported memory (pages) reveals the last reached milestone
typedef unsigned int u32;
typedef unsigned long long u64;
static char pad[1 << 20];
static inline void mk(int k) { volatile char *p = pad; p[k * 4096] = 1; }
struct DI32 {
    u32 abi_version; u32 stdin_ptr; u32 stdin_size; u32 stdout_ptr; u32 stdout_limit;
    u32 stdout_size; u32 stderr_ptr; u32 stderr_limit; u32 stderr_size;
    u32 IB_ptr; u32 IB_limit; u32 OB_ptr; u32 OB_limit; u64 tsc_frequency;
} __attribute__((packed));
extern "C" unsigned long getauxval(unsigned long);
extern "C" void _exit(int);
__attribute__((constructor(101))) static void f(void) {
    mk(1);                                  // 1: constructor ran
    unsigned long a = getauxval(0x6b637564UL);
    if (!a) { mk(2); _exit(0); }            // 2: no AT_DUCK
    mk(3);                                  // 3: auxv found
    DI32 *di = (DI32 *)a;
    unsigned key = di->stdin_size;
    if (key >= 4096U) mk(4);                // 4: stdin_size >= 4096
    char *ob = (char *)di->OB_ptr;
    mk(5);                                  // 5: OB_ptr read
    ob[0] = 1;
    mk(6);                                  // 6: OB write ok
    _exit(0);
}
unsigned solve(int n, char *s) { (void)n; (void)s; return 0; }

CompilationN/AN/ACompile OKScore: N/A

Testcase #17.75 us28 KBRuntime ErrorScore: 0

Testcase #27.69 us32 KBRuntime ErrorScore: 0

Testcase #37.34 us32 KBRuntime ErrorScore: 0

Testcase #46.96 us32 KBRuntime ErrorScore: 0


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