提交记录 19870


用户 题目 状态 得分 用时 内存 语言 代码长度
lotus_f wc2017b1. 【WC2017】挑战-任务1 Runtime Error 0 442.504 ms 781280 KB C++14 806 B
提交时间 评测时间
2023-08-11 16:17:04 2023-08-11 16:17:07
#include<bits/stdc++.h>
using namespace std;
void sort(unsigned *a,int n)
{
	unsigned *b=new unsigned[n],*cnt=new unsigned[n];
	memset(cnt,0,sizeof(cnt));
	for(int j=1; j<=n; ++j) ++cnt[a[j]&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n; j>=1; --j) b[cnt[a[j]&255]--]=a[j];
	memset(cnt,0,sizeof(cnt));
	for(int j=1; j<=n; ++j) ++cnt[b[j]>>8&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n; j>=1; --j) a[cnt[b[j]>>8&255]--]=b[j];
	memset(cnt,0,sizeof(cnt));
	for(int j=1; j<=n; ++j) ++cnt[a[j]>>16&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n; j>=1; --j) b[cnt[a[j]>>16&255]--]=a[j];
	memset(cnt,0,sizeof(cnt));
	for(int j=1; j<=n; ++j) ++cnt[b[j]>>24&255];
	for(int j=1; j<256; ++j) cnt[j]+=cnt[j-1];
	for(int j=n; j>=1; --j) a[cnt[b[j]>>24&255]--]=b[j];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1289.79 us816 KBRuntime ErrorScore: 0

Testcase #2442.504 ms762 MB + 992 KBRuntime ErrorScore: 0

Testcase #3365.08 ms762 MB + 992 KBRuntime ErrorScore: 0


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