提交记录 22028
提交时间 |
评测时间 |
2024-07-29 20:43:17 |
2024-07-29 20:43:24 |
#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 | 1.197 ms | 812 KB | Accepted | Score: 34 | 显示更多 |
Testcase #2 | 1.417 s | 762 MB + 996 KB | Accepted | Score: 33 | 显示更多 |
Testcase #3 | 2.83 s | 1525 MB + 932 KB | Accepted | Score: 33 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-22 06:02:46 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠