提交记录 10120
| 提交时间 |
评测时间 |
| 2019-08-13 18:15:58 |
2020-08-01 02:01:49 |
#include <stdio.h>
#include <string.h>
void sort(unsigned * a, int n) {
static int cnt[256];
static unsigned b[100000005];
for (int i = 0; i < 32; i += 8) {
memset(cnt, 0, 1024);
for (int j = 0; j < n; j += 4) {
cnt[a[j] >> i & 255] ++;
cnt[a[j] >> i + 1 & 255] ++;
cnt[a[j] >> i + 2 & 255] ++;
cnt[a[j] >> i + 3 & 255] ++;
}
for (int j = 1; j < 256; ++ j) {
cnt[j] += cnt[j - 1];
}
for (int j = n - 1; ~j; -- j) {
b[-- cnt[a[j] >> i & 255]] = a[j];
}
memcpy(a, b, sizeof(unsigned) * n);
}
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 227.919 ms | 263 MB + 56 KB | Runtime Error | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-30 03:06:39 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠