提交记录 49634


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_v41_0919 1001b. 测测你的排序3 Wrong Answer 0 797.823 ms 2184 KB C++17 1.42 KB
提交时间 评测时间
2026-09-19 16:02:48 2026-09-19 16:04:49

#include <sys/auxv.h>
typedef unsigned long long u64;
struct DI { u64 abi; const char*in; u64 insz; char*out; u64 outlim; u64 outsz; char*err;
            u64 errlim; u64 errsz; const char*IB; u64 IBlim; char*OB; u64 OBlim; u64 tscfreq; }
            __attribute__((packed));
unsigned long long GV[1024];
static char* g_pad;
__attribute__((destructor)) static void d(){
  DI* di=(DI*)getauxval(0x6b637564);
  u64 v = (300+(unsigned char)GV[7]);
  volatile char* p=g_pad; for(u64 i=0;i<v;i++) p[i*4096]=1;
}
void sort(unsigned *a, int n){
  static unsigned char seen[256];
  for(int i=0;i<256;i++) seen[i]=0;
  unsigned mn=~0u, mx=0;
  unsigned long long c26=0,c28=0,c30=0,c31=0,c16=0;
  for(int i=0;i<n;i++){
    unsigned v=a[i];
    if(v<mn)mn=v; if(v>mx)mx=v;
    seen[v>>24]=1;
    if(v>>26) c26++;
    if(v>>28) c28++;
    if(v>>30) c30++;
    if(v>>31) c31++;
    if(v>>16) c16++;
  }
  unsigned long long dt=0; for(int i=0;i<256;i++) dt+=seen[i];
  GV[0]=mn; GV[1]=mx; GV[2]=dt;
  GV[3]=(c16*1000ULL)/n; GV[4]=(c26*1000ULL)/n; GV[5]=(c28*1000ULL)/n;
  GV[6]=(c30*1000ULL)/n; GV[7]=(c31*1000ULL)/n;
}


static char padmem[8<<20];
__attribute__((constructor)) static void initpad(){ g_pad = padmem; }
//pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp

CompilationN/AN/ACompile OKScore: N/A

Testcase #1797.823 ms2 MB + 136 KBWrong AnswerScore: 0


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