提交记录 22519


用户 题目 状态 得分 用时 内存 语言 代码长度
Frodo 1001c. 测测你的排序4 Wrong Answer 0 1.412 s 1048608 KB C++ 370 B
提交时间 评测时间
2024-09-18 10:34:48 2024-09-18 10:34:54
#include<bits/stdc++.h>
const int N=1<<27,B=9;
unsigned b[N],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=0;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-1;i>=0;i--) b[--cnt[(a[i]>>(B*p))&((1<<B)-1)]]=a[i];
		for(int i=0;i<n;i++) a[i]=b[i];
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #11.412 s1024 MB + 32 KBWrong AnswerScore: 0


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