提交记录 5434


用户 题目 状态 得分 用时 内存 语言 代码长度
chen_zhe 1003. 测测你的二分查找 Accepted 100 323.28 us 12 KB C++ 214 B
提交时间 评测时间
2018-08-22 18:35:37 2020-08-01 00:17:11
int binary_search(const unsigned *a, int n, unsigned x)
{
	int l=0,r=n,mid;
    while(l<=r)
	{
        mid=l+r>>1;
        if (a[mid]==x)
        	return mid;
		(a[mid]<x)?(l=mid+1):(r=mid-1);
    }
    return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1323.28 us12 KBAcceptedScore: 100


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