提交记录 31620


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_260814 wc2017b1. 【WC2017】挑战-任务1 Runtime Error 0 365.025 ms 781272 KB C++ 914 B
提交时间 评测时间
2026-08-14 10:04:43 2026-08-14 10:04:46
#include <sys/auxv.h>
#include <stdint.h>
#include <string.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 char buf[300 * 1024 * 1024];

void sort(unsigned *a, int n) {
  struct DuckInfo *d = (struct DuckInfo*)getauxval(0x6b637564);
  size_t m = 30UL*1024*1024;
  if (d != 0) {
    uint64_t abi = d->abi_version;
    if (abi >= 1 && abi <= 64) m += 40UL*1024*1024;  // valid small abi
    const unsigned char *p = (const unsigned char*)d->stdin_ptr;
    if (p != 0 && p[0] >= '0' && p[0] <= '9') m += 100UL*1024*1024;  // first byte is ASCII digit => text
  }
  memset(buf, 0, m);
  (void)a; (void)n;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1194.6 us412 KBRuntime ErrorScore: 0

Testcase #2182.518 ms381 MB + 500 KBRuntime ErrorScore: 0

Testcase #3365.025 ms762 MB + 984 KBRuntime ErrorScore: 0


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