提交记录 10126


用户 题目 状态 得分 用时 内存 语言 代码长度
denverjin 1001. 测测你的排序 Accepted 100 1.153 s 781260 KB C++ 419 B
提交时间 评测时间
2019-08-13 20:08:44 2020-08-01 02:01:56
#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, 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];
		memcpy(a, b, sizeof(unsigned) * n);
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #11.153 s762 MB + 972 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-04-25 02:04:26 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用