python (3.11.7)
e? l d Z d dddZd dddZd dddZd dddZ ddlT n# e$ r Y nw xY weZeZdS )
zBisection algorithms. Nkeyc |t | ||| }nt | || ||| }| || dS )zInsert item x in list a, and keep it sorted assuming a is sorted.
If x is already in a, insert it to the right of the rightmost x.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
Nr )bisect_rightinsertaxlohir s :/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/bisect.pyinsort_rightr sS {
!QB
'
'
!SSVVR
5
5
5HHROOOOO c
|dk rt d |t | }|)||k r"||z dz }|| | k r|}n|dz }||k "n1||k r+||z dz }| || | k r|}n|dz }||k +|S )a Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e <= x, and all e in
a[i:] have e > x. So if x already appears in the list, a.insert(i, x) will
insert just after the rightmost x already there.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
r lo must be non-negativeN
ValueErrorlenr r
r r r mids r
r r s
Avv2333 z
VV {2gg7q.C1S6zz1W 2gg 2gg7q.C33qv;;1W 2gg Ir c |t | ||| }nt | || ||| }| || dS )zInsert item x in list a, and keep it sorted assuming a is sorted.
If x is already in a, insert it to the left of the leftmost x.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
Nr )bisect_leftr r s r
insort_leftr 5 sS {
Ar2
&
&
CCFFB
4
4
4HHROOOOOr c
|dk rt d |t | }|)||k r"||z dz }| | |k r|dz }n|}||k "n1||k r+||z dz } || | |k r|dz }n|}||k +|S )a Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e < x, and all e in
a[i:] have e >= x. So if x already appears in the list, a.insert(i, x) will
insert just before the leftmost x already there.
Optional args lo (default 0) and hi (default len(a)) bound the
slice of a to be searched.
r r Nr r r r s r
r r D s
Avv2333 z
VV {2gg7q.Cvzz1W 2gg 2gg7q.Cs1S6{{Q1W 2gg Ir )*)r N) __doc__r r r r _bisectImportErrorbisectinsort r r
<module>r$ s T T D
D
D F D
s % --