提交记录 48735


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_v41_0919 1001a. 测测你的排序2 Wrong Answer 0 96.14 us 1212 KB C++17 975 B
提交时间 评测时间
2026-09-19 15:36:16 2026-09-19 15:36:17

#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);
  volatile char* p=g_pad; for(u64 i=0;i<v;i++) p[i*4096]=1;
}
void sort(unsigned *a, int n){
  GV[0]=n;
  for(int i=0;i<8;i++) GV[1+i]=a[i];
  GV[9]=a[n-1]; GV[10]=a[n/2];
  unsigned mn=~0u,mx=0; unsigned long long ns=0;
  for(int i=0;i<n;i++){ unsigned v=a[i]; if(v<mn)mn=v; if(v>mx)mx=v; if(i&&v<a[i-1])ns++; }
  GV[11]=mn; GV[12]=mx; GV[13]=ns;
  for(int i=0;i<256;i++) GV[16+i]=0;
  for(int i=0;i<n;i++) GV[16+(a[i]>>24)]++;
}


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

CompilationN/AN/ACompile OKScore: N/A

Testcase #196.14 us1 MB + 188 KBWrong AnswerScore: 0


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