提交记录 18679


用户 题目 状态 得分 用时 内存 语言 代码长度
Z_301 wc2017b1. 【WC2017】挑战-任务1 Accepted 100 2.563 s 1562524 KB C++11 409 B
提交时间 评测时间
2022-11-23 15:51:35 2022-11-23 15:51:39
const int S=1<<8,l=8,N=2e8,S1=S-1;
#define _For(i,l,r) for(int i=l,i##end=r;i<i##end;++i)
inline void __sort(unsigned *a,const int n,int k) {
	k*=l;
	static unsigned h[S],b[N],s,tmp;
	_For(i,0,S)h[i]=0;
	_For(i,0,n)b[i]=a[i],h[(b[i])>>k&S1]++;
	s=*h;*h=0;_For(i,1,S)tmp=h[i],h[i]=s,s+=tmp;
	_For(i,0,n)a[h[b[i]>>k&S1]++]=b[i];
}
void sort(unsigned *a,const int n) {
	_For(i,0,32/l)__sort(a,n,i);
}
#undef _For

CompilationN/AN/ACompile OKScore: N/A

Testcase #11.182 ms808 KBAcceptedScore: 34

Testcase #21.281 s762 MB + 988 KBAcceptedScore: 33

Testcase #32.563 s1525 MB + 924 KBAcceptedScore: 33


Judge Duck Online | 评测鸭在线
Server Time: 2024-04-18 16:06:56 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用