提交记录 2183


用户 题目 状态 得分 用时 内存 语言 代码长度
Cedric341561 1003. 测测你的二分查找 Wrong Answer 0 324.56 us 12 KB C 176 B
提交时间 评测时间
2018-06-22 15:57:55 2020-07-31 20:59:38
int binary_search(const unsigned *a, int n, unsigned x)
{
	int l=0,r=n,ans=0;
	while(l<r)
	{
		int mid=(l+r)/2;
		if(a[mid]<x)l=mid+1;
		else r=mid-1,ans=mid;
	}
	return ans;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1324.56 us12 KBWrong AnswerScore: 0


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