提交记录 16947


用户 题目 状态 得分 用时 内存 语言 代码长度
Minion wc2017b1. 【WC2017】挑战-任务1 Accepted 100 2.321 s 1562524 KB C++11 718 B
提交时间 评测时间
2021-11-09 07:28:38 2021-11-09 07:28:42
#define fo(i,x,y) for(int i = x;i <= y;i++)
#define fd(i,x,y) for(int i = x;i >= y;i--)
int cnt[260];
unsigned B[200000010];
void sort(unsigned *a, int n) {
	n--;
	fo(i,0,255) cnt[i] = 0;
	fo(i,0,n) cnt[a[i] & 255]++;
	fo(i,1,255) cnt[i] += cnt[i - 1];
	fd(i,n,0) B[--cnt[a[i] & 255]] = a[i];
	fo(i,0,255) cnt[i] = 0;
	fo(i,0,n) cnt[B[i] >> 8 & 255]++;
	fo(i,1,255) cnt[i] += cnt[i - 1];
	fd(i,n,0) a[--cnt[B[i] >> 8 & 255]] = B[i];
	fo(i,0,255) cnt[i] = 0;
	fo(i,0,n) cnt[a[i] >> 16 & 255]++;
	fo(i,1,255) cnt[i] += cnt[i - 1];
	fd(i,n,0) B[--cnt[a[i] >> 16 & 255]] = a[i];
	fo(i,0,255) cnt[i] = 0;
	fo(i,0,n) cnt[B[i] >> 24 & 255]++;
	fo(i,1,255) cnt[i] += cnt[i - 1];
	fd(i,n,0) a[--cnt[B[i] >> 24 & 255]] = B[i];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #11.055 ms808 KBAcceptedScore: 34

Testcase #21.16 s762 MB + 988 KBAcceptedScore: 33

Testcase #32.321 s1525 MB + 924 KBAcceptedScore: 33


Judge Duck Online | 评测鸭在线
Server Time: 2026-03-18 08:31:48 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠