



"""simple docstring"""




from hashlib import mda, shaaaa

_lowerCAmelCase				:					List[str]							=							(shaaaa, mda)






class 	UpperCAmelCase_  :



      def __init__(     self     :	Union[str, Any]     ,	A     :	int = 8						):
           _UpperCAmelCase			:	Union[str, Any]								=    0b0
           _UpperCAmelCase			:	str								=    size



      def 						snake_case_					(     self     :	List[str]     ,	A     :	str						):
           _UpperCAmelCase			:	List[str]								=    self.hash_(A						)
           self.bitarray |= h



      def 						snake_case_					(     self     :	Dict     ,	A     :	str						):
           _UpperCAmelCase			:	Dict								=    self.hash_(A						)
           return (h & self.bitarray) == h



      def __contains__(     self     :	Tuple     ,	A     :	str						):
           return self.exists(A						)



      def 						snake_case_					(     self     :	List[Any]     ,	A     :	int						):
           _UpperCAmelCase			:	Tuple								=    bin(A						)[2:]
           return res.zfill(self.size						)



      @property
      def 						snake_case_					(     self     :	int						):
           return self.format_bin(self.bitarray						)



      def 						snake_case_					(     self     :	Any     ,	A     :	str						):
           _UpperCAmelCase			:	Optional[Any]								=    0b0
           for func in HASH_FUNCTIONS:
                _UpperCAmelCase			:	Optional[Any]								=    (
                    int.from_bytes(func(value.encode()						).digest()     ,	"little"						) % self.size
                )
                res |= 2**position
           return res



      def 						snake_case_					(     self     :	int     ,	A     :	str						):
           return self.format_bin(self.hash_(A						)						)



      @property
      def 						snake_case_					(     self     :	Any						):
           _UpperCAmelCase			:	Optional[int]								=    bin(self.bitarray						).count("1"						)
           return (n_ones / self.size) ** len(A						)




from __future__ import annotations
def       UpperCamelCase__     (  SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase					,     __lowerCamelCase		:							str							=						m - 1, 0
 while i >= 0 and j < n:
  if key == mat[i][j]:
   print(f'Key {key} found at row- {i + 1} column- {j + 1}'						)
   return
  if key < mat[i][j]:
   i -= 1
  else:
   j += 1
 print(f'Key {key} not found'						)
def       UpperCamelCase__     (  ):
 __lowerCamelCase		:							List[Any]							=						[[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
 __lowerCamelCase		:							int							=						int(input('Enter the element to be searched:'						)						)
 print(SCREAMING_SNAKE_CASE__						)
 search_in_a_sorted_matrix(SCREAMING_SNAKE_CASE__			,       len(SCREAMING_SNAKE_CASE__						)			,       len(mat[0]						)			,       SCREAMING_SNAKE_CASE__						)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()

