提交记录 22520
提交时间 |
评测时间 |
2024-09-18 10:35:43 |
2024-09-18 10:36:05 |
#include<bits/stdc++.h>
const int N=1<<27,B=8;
unsigned b[N],cnt[1<<B];
void sort(unsigned *a,int n){
for(int p=0;p<4;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];
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 16.68 s | 1024 MB + 32 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-07-12 17:43:58 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠