提交记录 22516
提交时间 |
评测时间 |
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];
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 534.268 ms | 1024 MB + 32 KB | Runtime Error | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-07-12 17:06:47 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠