提交记录 15620


用户 题目 状态 得分 用时 内存 语言 代码长度
comprehension 1001. 测测你的排序 Compile Error 0 0 ns 0 KB C++11 501 B
提交时间 评测时间
2021-01-05 19:12:41 2021-01-05 19:12:42
template<typename Type>
void sort(Type*const&first,Type*const&last){//[first,last)
	int number=last-first,half=number>>1;
	if(first!=last-1){
Type*	const middleF=first+half,
	*	const temp=new Type[number],
	*	const tlast=temp+number,
	*i=first,*j=middleF,*t=temp;
		sort(first,middleF),sort(middleF,last);
		for(;t!=tlast;)
			*t++= i!=middleF and (j==last or *i<*j)?*i++:*j++;
		for(i=first;i<last;++i)
			*i=temp[i-first];
		delete temp;
	}
}
void sort(unsigned *a, int n) {
	std::sort(a, a + n);
}

CompilationN/AN/ACompile ErrorScore: N/A


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