提交记录 598


用户 题目 状态 得分 用时 内存 语言 代码长度
sshockwave 1003. 测测你的二分查找 Accepted 100 323.37 us 12 KB C 249 B
提交时间 评测时间
2018-06-20 14:49:23 2020-07-31 20:40:43
int binary_search(const unsigned * const a, const int n, const unsigned x) {
	unsigned l=0,r=n-1;
	for(;l<r;){
		const unsigned m=(l+r)>>1;
		const unsigned v=a[m];
		if(v==x)return m;
		else if(v<x){
			l=m+1;
		}else{
			r=m-1;
		}
	}
	return l;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1323.37 us12 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-05-08 09:56:51 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用