提交记录 22516


用户 题目 状态 得分 用时 内存 语言 代码长度
Frodo 1001c. 测测你的排序4 Runtime Error 0 534.268 ms 1048608 KB C++ 372 B
提交时间 评测时间
2024-09-18 10:32:47 2024-09-18 10:32:52
#include<bits/stdc++.h>
const int N=1<<27,B=9;
unsigned b[N+1],cnt[1<<B];
void sort(unsigned *a,int n){
	for(int p=0;p<3;p++){
		for(int i=0;i<(1<<B);i++) cnt[i]=0;
		for(int i=1;i<=n;i++) cnt[(a[i]>>(B*p))&((1<<B)-1)]++;
		for(int i=0;i<(1<<B);i++) cnt[i]+=cnt[i-1];
		for(int i=n;i>=1;i--) b[cnt[(a[i]>>(B*p))&((1<<B)-1)]--]=a[i];
		for(int i=1;i<=n;i++) a[i]=b[i];
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1534.268 ms1024 MB + 32 KBRuntime ErrorScore: 0


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