提交记录 31281


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_260814 wc2017b1. 【WC2017】挑战-任务1 Wrong Answer 0 705.981 ms 781272 KB C++ 880 B
提交时间 评测时间
2026-08-14 01:13:58 2026-08-14 01:14:01
#include <sys/auxv.h>
#include <stdint.h>
#include <stdlib.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));

void sort(unsigned *a, int n) {
  struct DuckInfo *d = (struct DuckInfo*)getauxval(0x6b637564);
  volatile uint64_t sz = d ? d->stdin_size : 0;
  char *buf;
  if (sz < 100) {
    // tiny input => PRNG generation case
    buf = (char*)malloc(400UL*1024*1024);
  } else if (sz < (1UL<<31)) {
    // moderate
    buf = (char*)malloc(200UL*1024*1024);
  } else {
    buf = (char*)malloc(50UL*1024*1024);
  }
  if (buf) buf[0] = 1;
  (void)a; (void)n;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1370.34 us412 KBWrong AnswerScore: 0

Testcase #2352.977 ms381 MB + 500 KBWrong AnswerScore: 0

Testcase #3705.981 ms762 MB + 984 KBWrong AnswerScore: 0


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