提交记录 2851


用户 题目 状态 得分 用时 内存 语言 代码长度
fbhou 1001a. 测测你的排序2 Wrong Answer 0 956.66 us 352 KB C++ 522 B
提交时间 评测时间
2018-06-30 11:20:11 2020-07-31 21:07:41
#include<vector>
using namespace std;
const int maxn=100010,base=1000,maxlog=3;
int x[maxn],cnt,p=1,q=1;
vector<int> buck[maxlog][base];
void sort(unsigned *a, int n) {
	for(int i=0;i<maxlog;i++)
    {
        p*=base;cnt=0;
        for(int k=0;k<base;k++) buck[i][k].clear();
        for(register int j=0;j<n;j++) buck[i][(a[j]%p)/q].push_back(a[j]);
        for(int k=0;k<base;k++)
        {
            int s=buck[i][k].size();
            for(int m=0;m<s;m++) a[cnt++]=buck[i][k][m];
        }
        q*=base;
    }
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1956.66 us352 KBWrong AnswerScore: 0


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