提交记录 10127
提交时间 |
评测时间 |
2019-08-13 20:12:21 |
2020-08-01 02:01:57 |
#include <stdio.h>
#include <string.h>
void sort(unsigned * a, int n) {
int cnt[256];
static unsigned _b[100000005];
unsigned *b = _b;
for (int i = 0; i < 32; i += 8) {
memset(cnt, 0, sizeof(int) * 256);
for (int j = 0; j < n; ++ j) cnt[a[j] >> i & 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];
unsigned * tmp = a; a = b; b = tmp;
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 980.063 ms | 762 MB + 972 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-24 00:24:56 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠