提交记录 22036
提交时间 |
评测时间 |
2024-07-29 20:53:59 |
2024-07-29 20:54:21 |
#include <bits/stdc++.h>
using u32 = unsigned int;
using u64 = unsigned long long;
void sort(u32 *a, int n) {
static u32 cnt[256];
u32 *b = new u32[n];
for (int _ = 0; _ < 32; _ += 8) {
memset(cnt, 0, sizeof(cnt));
#pragma GCC unroll(8)
for (int i = 0; i < n; i++)
cnt[a[i] >> _ & 255]++;
for (int i = 0; i < 255; i++)
cnt[i + 1] += cnt[i];
for (int i = n - 1; ~i; i--)
b[--cnt[a[i] >> _ & 255]] = a[i];
memcpy(a, b, n * sizeof(u32));
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 16.544 s | 1024 MB + 32 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-23 09:12:50 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠