This documentation is automatically generated by online-judge-tools/verification-helper
def binsearch_int(s, e, f):
"""
Parameters
----------
s : int
e : int
f : callable
f(a) returns True if a <= a_max else returns False
"""
c_min = s
c_max = e
while c_min != c_max:
p = (c_min + c_max + 1) // 2
result = f(p)
if result:
c_min = p
else:
c_max = p - 1
return c_min
def f(X):
return X <= 1000
print(binsearch_int(0, 10000, f))
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/onlinejudge_verify/languages/python.py", line 96, in bundle
raise NotImplementedError
NotImplementedError