提交记录 20770


用户 题目 状态 得分 用时 内存 语言 代码长度
lotus_f wc2017b1. 【WC2017】挑战-任务1 Wrong Answer 0 2.19 s 1562532 KB C++14 686 B
提交时间 评测时间
2023-12-30 15:35:47 2023-12-30 15:35:54
#include<bits/stdc++.h>
using namespace std;
void sort(unsigned *a,int n)
{
	unsigned *b=new unsigned[n];
	int cnt1[256],cnt2[256],cnt3[256],cnt4[256];
	memset(cnt1,0,sizeof(cnt1)),memset(cnt2,0,sizeof(cnt2)),memset(cnt3,0,sizeof(cnt3)),memset(cnt4,0,sizeof(cnt4));
	for(int j=1; j<=n; ++j) ++cnt1[a[j]&255],++cnt2[a[j]>>8&255],++cnt3[a[j]>>16&255],++cnt4[a[j]>>24];
	for(int j=1; j<256; ++j) cnt1[j]+=cnt1[j-1],cnt2[j]+=cnt2[j-1],cnt3[j]+=cnt3[j-1],cnt4[j]+=cnt4[j-1];
	for(int j=n; j>=1; --j) b[cnt1[a[j]&255]--]=a[j];
	for(int j=n; j>=1; --j) a[cnt2[b[j]>>8&255]--]=b[j];
	for(int j=n; j>=1; --j) b[cnt3[a[j]>>16&255]--]=a[j];
	for(int j=n; j>=1; --j) a[cnt4[b[j]>>24&255]--]=b[j];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #11.031 ms812 KBWrong AnswerScore: 0

Testcase #21.094 s762 MB + 996 KBWrong AnswerScore: 0

Testcase #32.19 s1525 MB + 932 KBWrong AnswerScore: 0


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