提交记录 142497
| 提交时间 |
评测时间 |
| 2026-11-10 20:18:41 |
2026-11-10 20:19:20 |
#include<algorithm>
constexpr int B=8;
constexpr int msk=(1<<B)-1;
unsigned b[1<<27];
int cnt[1<<B];
void sort(unsigned *a, int n) {
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);
}
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 35.566 s | 1024 MB + 8 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-11-12 08:30:21 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠