提交记录 17549


用户 题目 状态 得分 用时 内存 语言 代码长度
user1 1003. 测测你的二分查找 Compile Error 0 0 ns 0 KB C++ 289 B
提交时间 评测时间
2022-03-26 23:34:40 2022-03-26 23:34:41
#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(a, a+n, [x](unsigned *a){return*a>=x;})-a;
}

CompilationN/AN/ACompile ErrorScore: N/A


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