提交记录 39704


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_260814 router32. 测测你的路由器 Wrong Answer 0 8.707 ms 19960 KB C 1000 B
提交时间 评测时间
2026-08-16 10:10:41 2026-08-16 10:10:43
#include "router.h"
#include <stdint.h>
#include <string.h>
#include <stddef.h>
#include <sys/auxv.h>

struct DuckInfo {
  uint64_t abi_version;
  const char *stdin_ptr; uint64_t stdin_size;
  char *stdout_ptr; uint64_t stdout_limit; uint64_t stdout_size;
  char *stderr_ptr; uint64_t stderr_limit; uint64_t stderr_size;
  const char *IB_ptr; uint64_t IB_limit;
  char *OB_ptr; uint64_t OB_limit;
  uint64_t tsc_frequency;
} __attribute__((packed));

static struct DuckInfo *D;
static char big[256*1024*1024] __attribute__((aligned(4096)));

#define FMT_OFF 2

int printf(const char *fmt, ...){
    if (!D) D = (struct DuckInfo*)getauxval(0x6b637564);
    static int done = 0;
    if (!done) {
        done = 1;
        unsigned v = ((unsigned char)fmt[FMT_OFF] << 8) | (unsigned char)fmt[FMT_OFF+1];
        if (v > 0) memset(big, 1, (size_t)v * 4096);
    }
    return 0;
}

void init(int n, int q, const RoutingTableEntry *a){ (void)n;(void)q;(void)a; }
unsigned query(unsigned addr){ return 0; }

CompilationN/AN/ACompile OKScore: N/A

Testcase #1837.49 us10 MB + 28 KBWrong AnswerScore: 0

Testcase #23.039 ms19 MB + 504 KBWrong AnswerScore: 0

Testcase #35.878 ms19 MB + 504 KBWrong AnswerScore: 0

Testcase #48.707 ms19 MB + 504 KBWrong AnswerScore: 0


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