提交记录 61877


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_v41_0919 1001c. 测测你的排序4 Wrong Answer 0 176.88 ms 1472 KB C++17 1.08 KB
提交时间 评测时间
2026-09-19 23:24:38 2026-09-19 23:24:53

#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[1]);
  volatile char* p=g_pad; for(u64 i=0;i<v;i++) p[i*4096]=1;
}
void sort(unsigned *a, int n){
  static unsigned c16[65536];
  for(int i=0;i<65536;i++) c16[i]=0;
  for(int i=0;i<n;i++) c16[a[i]>>16]++;
  unsigned t1=0,t2=0,t3=0,mx1=0,mx2=0;
  for(int k=0;k<65536;k++){ unsigned c=c16[k];
    if(c>64) t1++; if(c>4096) t2++; if(c>65536) t3++;
    if(c>mx1){mx2=mx1;mx1=c;} else if(c>mx2) mx2=c; }
  GV[0]=t1>255?255:t1;
  GV[1]=t2>255?255:t2;
  GV[2]=t3>255?255:t3;
  GV[3]=(unsigned long long)mx2*256*255/n;
}


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

CompilationN/AN/ACompile OKScore: N/A

Testcase #1176.88 ms1 MB + 448 KBWrong AnswerScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2026-11-06 15:00:56 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠