提交记录 17548


用户 题目 状态 得分 用时 内存 语言 代码长度
user1 1003. 测测你的二分查找 Accepted 100 324.55 us 12 KB C++ 284 B
提交时间 评测时间
2022-03-26 23:32:41 2022-03-26 23:32:44
#include <algorithm>
template<class T, class F>
T firstWithProp(T a, T b, F f) {
x:if (a==b) return a;
  T m = a + (b-a)/2;
  if (f(m)) b=m; else a=m+1;
  goto x;
}
int binary_search(const unsigned *a, int n, unsigned x){
	return firstWithProp(0, n, [a,x](int n){return a[n]>=x;});
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1324.55 us12 KBAcceptedScore: 100


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