Files
952-11/env/python/dll/Python312/Lib/__pycache__/bisect.cpython-312.pyc
T

45 lines
3.6 KiB
Plaintext
Raw Normal View History

2024-08-19 17:05:14 +08:00
Ë
*åfÕ
ãój—dZd ddœd„Zd ddœd„Zd ddœd„Zd ddœd„Z ddl­eZeZy#e$rYŒ wxYw)
zBisection algorithms.éN©Úkeycóv—|€t||||«}nt|||«|||¬«}|j||«y)a7Insert 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.
A custom key function can be supplied to customize the sort order.
Nr)Ú bisect_rightÚinsert©ÚaÚxÚloÚhirs úBC:\Users\RCi\AppData\Local\Programs\Python\Python312\Lib\bisect.pyÚ insort_rightrs<€ð €{Ü
˜!˜Q  BÓ
'‰ä
˜!™S ›V R¨°Ô
5ˆØ‡H�HˆR�…Oócóà—|dkr td«‚|€ t|«}|€%||kr||zdz}|||kr|}n|dz}||krŒ|S||kr$||zdz}||||«kr|}n|dz}||krŒ$|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.
A custom key function can be supplied to customize the sort order.
rúlo must be non-negativeéé©Ú
ValueErrorÚlen©r r
r r rÚmids r
rrs¬€ð
ˆA‚vÜÐ2Ó3Ð3Ø €zÜ
�‹Vˆð €{Ø�2Šgؘ‘7˜q‘.ˆCØ�1�S‘6ŠzØ‘à˜1‘W�ð �2‹gð €Ið
�2Šgؘ‘7˜q‘.ˆCØ‘3�q˜‘v“;ŠØ‘à˜1‘W�ð �2‹gð €Ircóv—|€t||||«}nt|||«|||¬«}|j||«y)a5Insert 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.
A custom key function can be supplied to customize the sort order.
Nr)Ú bisect_leftrrs r
Ú insort_leftr9s<€ð €{Ü
˜˜A˜r 2Ó
&‰ä
˜™C ›F B¨°Ô
4ˆØ‡H�HˆR�…Orcóà—|dkr td«‚|€ t|«}|€%||kr||zdz}|||kr|dz}n|}||krŒ|S||kr$||zdz}|||«|kr|dz}n|}||krŒ$|S)aËReturn the index where to insert item x in list a, assuming a is sorted.