提交记录 2852


用户 题目 状态 得分 用时 内存 语言 代码长度
fbhou 1001a. 测测你的排序2 Compile Error 0 0 ns 0 KB C++ 505 B
提交时间 评测时间
2018-06-30 11:21:32 2020-07-31 21:07:41
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 ErrorScore: N/A


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