提交记录 18762


用户 题目 状态 得分 用时 内存 语言 代码长度
Minion wc2017b1. 【WC2017】挑战-任务1 Accepted 100 2.32 s 1562524 KB C++11 902 B
提交时间 评测时间
2022-12-14 14:45:26 2022-12-14 14:45:30
#define fo(i,x,y) for(int i = x;i <= y;i++)
#define fd(i,x,y) for(int i = x;i >= y;i--)
#define u32 unsigned
int cnt[260];
u32 B[200000010];
void sort(u32 *A, int n)
{
	fo(i,0,255) cnt[i] = 0;
	for(u32 *i = A;i != A + n;++i) ++cnt[*i & 255];
	fo(i,1,255) cnt[i] += cnt[i - 1];
	for(u32 *i = A + n - 1;i != A - 1;--i) B[--cnt[*i & 255]] = *i;

	fo(i,0,255) cnt[i] = 0;
	for(u32 *i = B;i != B + n;++i) ++cnt[*i >> 8 & 255];
	fo(i,1,255) cnt[i] += cnt[i - 1];
	for(u32 *i = B + n - 1;i != B - 1;--i) A[--cnt[*i >> 8 & 255]] = *i;

	fo(i,0,255) cnt[i] = 0;
	for(u32 *i = A;i != A + n;++i) ++cnt[*i >> 16 & 255];
	fo(i,1,255) cnt[i] += cnt[i - 1];
	for(u32 *i = A + n - 1;i != A - 1;--i) B[--cnt[*i >> 16 & 255]] = *i;

	fo(i,0,255) cnt[i] = 0;
	for(u32 *i = B;i != B + n;++i) ++cnt[*i >> 24 & 255];
	fo(i,1,255) cnt[i] += cnt[i - 1];
	for(u32 *i = B + n - 1;i != B - 1;--i) A[--cnt[*i >> 24 & 255]] = *i;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #11.054 ms808 KBAcceptedScore: 34

Testcase #21.159 s762 MB + 988 KBAcceptedScore: 33

Testcase #32.32 s1525 MB + 924 KBAcceptedScore: 33


Judge Duck Online | 评测鸭在线
Server Time: 2024-03-29 23:34:40 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用