提交记录 13170


用户 题目 状态 得分 用时 内存 语言 代码长度
panyf 1001a. 测测你的排序2 Accepted 100 510.69 us 212 KB C++ 465 B
提交时间 评测时间
2020-07-27 11:26:43 2020-08-01 03:05:36
#include <bits/stdc++.h>
using namespace std;
vector<pair<unsigned,int> >v[259];
void sort(unsigned *a, int n) {
	int i,j=-1,k;
	vector<pair<unsigned,int> >::iterator it;
	for(i=0;i<n;++i){
		k=a[i]>>24,it=lower_bound(v[k].begin(),v[k].end(),pair<unsigned,int>{a[i],0});
		if(it!=v[k].end()&&it->first==a[i])++it->second;
		else v[k].insert(it,pair<unsigned,int>{a[i],1});
	}
	for(i=0;i<256;++i){
		for(auto o:v[i]){
			for(k=o.second;k;--k)a[++j]=o.first;
		}
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1510.69 us212 KBAcceptedScore: 100


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