提交记录 142501
| 提交时间 |
评测时间 |
| 2026-11-10 20:23:29 |
2026-11-10 20:23:35 |
#include<algorithm>
constexpr int B=6;
constexpr int msk=(1<<B)-1;
unsigned b[100000000];
int cnt[1<<B];
void sort(unsigned *a, int n) {
unsigned *r=a;
unsigned *b=::b;
for(int p=0;p<32;p+=B){
for(int i=0;i<(1<<B);++i)cnt[i]=0;
for(int i=0;i<n;++i)cnt[a[i]>>p&msk]++;
for(int i=1;i<(1<<B);++i)cnt[i]+=cnt[i-1];
for(int i=n-1;~i;--i)b[--cnt[a[i]>>p&msk]]=a[i];
std::swap(a,b);
}
if(a!=r)std::copy(a,a+n,r);
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 1.319 s | 762 MB + 972 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-11-12 08:30:21 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠