提交记录 21927
提交时间 |
评测时间 |
2024-07-15 12:48:34 |
2024-07-15 12:48:55 |
#define fo(i,x,y) for(int i = x;i <= y;++i)
#define u32 unsigned
u32 B[140000010],cnt[310];
void sort(u32 *a,int n)
{
fo(i,0,255) cnt[i] = 0;
for(u32 *i = a;i != a + n;++i) ++cnt[*i & 255];
fo(i,1,255) cnt[i] += cnt[i - 1];
for(u32 *i = a + n - 1;i != a - 1;--i) B[--cnt[*i & 255]] = *i;
fo(i,0,255) cnt[i] = 0;
for(u32 *i = B;i != B + n;++i) ++cnt[*i >> 8 & 255];
fo(i,1,255) cnt[i] += cnt[i - 1];
for(u32 *i = B + n - 1;i != B - 1;--i) a[--cnt[*i >> 8 & 255]] = *i;
fo(i,0,255) cnt[i] = 0;
for(u32 *i = a;i != a + n;++i) ++cnt[*i >> 16 & 255];
fo(i,1,255) cnt[i] += cnt[i - 1];
for(u32 *i = a + n - 1;i != a - 1;--i) B[--cnt[*i >> 16 & 255]] = *i;
fo(i,0,255) cnt[i] = 0;
for(u32 *i = B;i != B + n;++i) ++cnt[*i >> 24 & 255];
fo(i,1,255) cnt[i] += cnt[i - 1];
for(u32 *i = B + n - 1;i != B - 1;--i) a[--cnt[*i >> 24 & 255]] = *i;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 16.245 s | 1024 MB + 12 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-23 08:58:02 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠