提交记录 14096


用户 题目 状态 得分 用时 内存 语言 代码长度
xwmwr 1003. 测测你的二分查找 Accepted 100 321.59 us 12 KB C++ 175 B
提交时间 评测时间
2020-08-31 08:45:58 2020-08-31 08:46:01
int binary_search(const unsigned *a, int n, unsigned x)
{
	int l=1, r=n;
  while(l!=r) {
    int mid=(l+r)>>1;
    if(a[mid-1]<x) l=mid+1;
    else r=mid;
  }
  return l-1;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1321.59 us12 KBAcceptedScore: 100


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