提交记录 5874


用户 题目 状态 得分 用时 内存 语言 代码长度
__int128 1001. 测测你的排序 Compile Error 0 0 ns 0 KB C++11 1.29 KB
提交时间 评测时间
2018-09-05 13:47:01 2020-08-01 00:35:35
inline void insertSort_1(unsigned arr[], int length)
{
    int j; unsigned key;
    for (int i = 1; i < length; i++){
        key = arr[i];
        j = i - 1;
        while (j >= 0 && arr[j] > key){
            arr[j + 1] = arr[j];
            j--;
        }
        arr[j + 1] = key;
    }
}
void sort(unsigned *a, int n){
#define N 10000
#define D 128
#define D1 127
#define cal(w,w2,tw,op) \
p=w2-1;\
for(i=0;i<D;++i)rs[i]=p,p+=tw[i];\
for(i=0;i<N;i+=16){\
	p=w+i;\
	*++rs[p[0]op]=p[0],\
	*++rs[p[1]op]=p[1],\
	*++rs[p[2]op]=p[2],\
	*++rs[p[3]op]=p[3],\
	*++rs[p[4]op]=p[4],\
	*++rs[p[5]op]=p[5],\
	*++rs[p[6]op]=p[6],\
	*++rs[p[7]op]=p[7];\
	*++rs[p[8]op]=p[8],\
	*++rs[p[9]op]=p[9],\
	*++rs[p[10]op]=p[10],\
	*++rs[p[11]op]=p[11],\
	*++rs[p[12]op]=p[12],\
	*++rs[p[13]op]=p[13],\
	*++rs[p[14]op]=p[14],\
	*++rs[p[15]op]=p[15];\
}
unsigned b[N],*rs[D],t0[D],t1[D],t2[D],t3[D],t4[D];
unsigned*p,i,x;

for(i=0;i<N;){
#define A x=a[i],++t0[x>>4&D1],++t1[x>>11&D1],++t2[x>>18&D1],++t3[x>>25],++i;
A A A A 
#undef A
}
cal(a,b,t0,>>4&D1);
cal(b,a,t1,>>11&D1);
cal(a,b,t2,>>18&D1);
cal(b,a,t3,>>25);
//insertSort_1(a, N);
}

				

评测结果
Compilation	N/A	N/A	Compile OK	Score: N/A	显示更多
Testcase #1	65.02 us	84 KB	Accepted	Score: 100	显示更多
Judge Duck Online | Server Time: 2018-09-05 13:45:33 | Rendered in 2 ms 
个人娱乐项目,仅供学习交流使用!

CompilationN/AN/ACompile ErrorScore: N/A


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