提交记录 15562
| 提交时间 |
评测时间 |
| 2021-01-01 19:39:49 |
2021-01-01 19:39:53 |
void sort(unsigned *a,int n)
{
unsigned *b=new unsigned[n];
unsigned cnt[256];
#define countingSort(a,b,k) \
for(int i=0;i<256;i++) cnt[i]=0;\
for(int i=0;i<n;++i) ++cnt[a[i]>>k&255];\
for(int i=1;i<=255;++i) cnt[i]+=cnt[i-1];\
for(int i=n-1;~i;--i) b[--cnt[a[i]>>k&255]]=a[i];\
countingSort(a,b,0);
countingSort(b,a,8);
countingSort(a,b,16);
countingSort(b,a,24);
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 1.062 ms | 800 KB | Accepted | Score: 34 | 显示更多 |
| Testcase #2 | 1.166 s | 762 MB + 984 KB | Accepted | Score: 33 | 显示更多 |
| Testcase #3 | 2.334 s | 1525 MB + 920 KB | Accepted | Score: 33 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-20 15:29:35 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠