提交记录 17550


用户 题目 状态 得分 用时 内存 语言 代码长度
user1 1003. 测测你的二分查找 Accepted 100 323.01 us 12 KB C++ 295 B
提交时间 评测时间
2022-03-26 23:35:49 2022-03-26 23:35:52
#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](const unsigned *a){return*a>=x;})-a;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1323.01 us12 KBAcceptedScore: 100


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