提交记录 5677


用户 题目 状态 得分 用时 内存 语言 代码长度
hehe12301 1003. 测测你的二分查找 Accepted 100 325.7 us 12 KB C++ 178 B
提交时间 评测时间
2018-09-01 20:36:48 2020-08-01 00:21:32
int binary_search(const unsigned *a, int n, unsigned x)
{
	const unsigned *l=a,*r=a+n,*mid;
	while(l+1<r)
	{
		mid=l+(r-l)/2;
		if(*mid<=x)	l=mid;
		else	r=mid;
	}
	return l-a;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1325.7 us12 KBAcceptedScore: 100


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