提交记录 13167


用户 题目 状态 得分 用时 内存 语言 代码长度
panyf 1001a. 测测你的排序2 Accepted 100 615.36 us 700 KB C++ 469 B
提交时间 评测时间
2020-07-27 11:25:20 2020-08-01 03:05:35
#include <bits/stdc++.h>
using namespace std;
vector<pair<unsigned,int> >v[16389];
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]>>18,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<16384;++i){
		for(auto o:v[i]){
			for(k=o.second;k;--k)a[++j]=o.first;
		}
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1615.36 us700 KBAcceptedScore: 100


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