This documentation is automatically generated by online-judge-tools/verification-helper
import cp_library.__header__
import cp_library.alg.__header__
import cp_library.alg.divcon.__header__
def bisect_right(A, x, l, r):
while l<r:
if x<A[m:=(l+r)>>1]:r=m
else:l=m+1
return l
'''
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
https://kobejean.github.io/cp-library
'''
def bisect_right(A, x, l, r):
while l<r:
if x<A[m:=(l+r)>>1]:r=m
else:l=m+1
return l