提交记录 21617
提交时间 |
评测时间 |
2024-04-16 20:52:57 |
2024-04-16 20:53:05 |
#include <algorithm>
#include<string.h>
int s[65536];
void sort(unsigned *a, int n) {
unsigned* aa=new unsigned[n];
for(int ii=0,i;ii<32;ii+=16){
memset(s,0,sizeof(s));
for(i=0;i<n;i+=8){
++s[(a[i]>>ii)&65535];
++s[(a[i+1]>>ii)&65535];
++s[(a[i+2]>>ii)&65535];
++s[(a[i+3]>>ii)&65535];
++s[(a[i+4]>>ii)&65535];
++s[(a[i+5]>>ii)&65535];
++s[(a[i+6]>>ii)&65535];
++s[(a[i+7]>>ii)&65535];
}
for(;i<n;++i)
++s[(a[i]>>ii)&65535];
for(i=1;i<65536;++i)s[i]+=s[i-1];
for(i=n-1;i>=0;--i)aa[--s[(a[i]>>ii)&65535]]=a[i];
std::swap(a,aa);
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 4.231 s | 1024 MB + 272 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:10:16 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠