提交记录 13166


用户 题目 状态 得分 用时 内存 语言 代码长度
panyf 1001a. 测测你的排序2 Runtime Error 0 835.09 us 6928 KB C++ 469 B
提交时间 评测时间
2020-07-27 11:24:58 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]>>12,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 #1835.09 us6 MB + 784 KBRuntime ErrorScore: 0


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