提交记录 19873


用户 题目 状态 得分 用时 内存 语言 代码长度
lotus_f wc2017b1. 【WC2017】挑战-任务1 Accepted 100 2.295 s 1562528 KB C++14 796 B
提交时间 评测时间
2023-08-11 16:28:57 2023-08-11 16:29:02
#include<bits/stdc++.h>
using namespace std;
void sort(unsigned *a,int n)
{
	unsigned *b=new unsigned[n],*cnt=new unsigned[256];
	memset(cnt,0,1024);
	for(int j=0; j<=n-1; ++j) ++cnt[a[j]&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n-1; j>=0; --j) b[--cnt[a[j]&255]]=a[j];
	memset(cnt,0,1024);
	for(int j=0; j<=n-1; ++j) ++cnt[b[j]>>8&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n-1; j>=0; --j) a[--cnt[b[j]>>8&255]]=b[j];
	memset(cnt,0,1024);
	for(int j=0; j<=n-1; ++j) ++cnt[a[j]>>16&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n-1; j>=0; --j) b[--cnt[a[j]>>16&255]]=a[j];
	memset(cnt,0,1024);
	for(int j=0; j<=n-1; ++j) ++cnt[b[j]>>24&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n-1; j>=0; --j) a[--cnt[b[j]>>24&255]]=b[j];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #11.062 ms812 KBAcceptedScore: 34

Testcase #21.146 s762 MB + 992 KBAcceptedScore: 33

Testcase #32.295 s1525 MB + 928 KBAcceptedScore: 33


Judge Duck Online | 评测鸭在线
Server Time: 2025-09-14 11:32:58 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠