ok
Direktori : /proc/thread-self/root/opt/alt/python311/lib64/python3.11/__pycache__/ |
Current File : //proc/thread-self/root/opt/alt/python311/lib64/python3.11/__pycache__/bisect.cpython-311.pyc |
� �f? � �l � d Z d dd�d�Zd dd�d�Zd dd�d�Zd dd�d�Z ddlT n# e$ r Y nw xY weZeZdS ) zBisection algorithms.� N��keyc � � |�t | |||� � }nt | ||� � |||�� � }| � ||� � dS )z�Insert 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_right�insert��a�x�lo�hir s �-/opt/alt/python311/lib64/python3.11/bisect.py�insort_rightr sS � � �{� �!�Q��B� '� '��� �!�S�S��V�V�R��� 5� 5� 5���H�H�R��O�O�O�O�O� 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� � �� ValueError�len�r r r r r �mids r r r s� � � �A�v�v��2�3�3�3� �z� ��V�V�� �{��2�g�g���7�q�.�C��1�S�6�z�z�����1�W�� �2�g�g�� �2�g�g���7�q�.�C��3�3�q��v�;�;�������1�W�� �2�g�g� �Ir c � � |�t | |||� � }nt | ||� � |||�� � }| � ||� � dS )z�Insert 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 � � �{� ��A�r�2� &� &��� ��C�C��F�F�B��� 4� 4� 4���H�H�R��O�O�O�O�Or 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� � � �A�v�v��2�3�3�3� �z� ��V�V�� �{��2�g�g���7�q�.�C���v��z�z��1�W����� �2�g�g�� �2�g�g���7�q�.�C��s�1�S�6�{�{�Q����1�W����� �2�g�g� �Ir )�*)r N) �__doc__r r r r �_bisect�ImportError�bisect�insort� r r �<module>r$ s� �� � ��T� � � � � ��T� � � � � �D �D� � � � � ��D� � � � � �F �������� � � ��D� ���� �� ���s �% �-�-