



def 						snake_case__							(       __lowercase				,  __lowercase				,  __lowercase				,  __lowercase							)		->		Optional[Any]:







						"""simple docstring"""

						A__						:				Tuple         =			int((lower_bound + upper_bound) // 2							)
						if array[r] == value:
												return r
						if lower_bound >= upper_bound:
												return -1
						if array[r] < value:
												return binary_search(lowerCAmelCase__				,  r + 1				,  lowerCAmelCase__				,  lowerCAmelCase__							)
						else:
												return binary_search(lowerCAmelCase__				,  lowerCAmelCase__				,  r - 1				,  lowerCAmelCase__							)
def 						snake_case__							(       __lowercase				,  __lowercase							)		->		Dict:







						"""simple docstring"""

						A__						:				Union[str, Any]         =			0
						if matrix[index][0] == value:
												return [index, 0]
						while index < len(lowerCAmelCase__							) and matrix[index][0] < value:
												A__						:				int         =			binary_search(matrix[index]				,  0				,  len(matrix[index]							) - 1				,  lowerCAmelCase__							)
												if r != -1:
																		return [index, r]
												index += 1
						return [-1, -1]


if __name__ == "__main__":
		import doctest

		doctest.testmod()







def      UpperCAmelCase						( lowerCAmelCase__					,     lowerCAmelCase__	):


		'''simple docstring'''

		if n < 0:
				return 0
		# table[i] represents the number of ways to get to amount i
		__A    =							[0] * (n + 1)

		# There is exactly 1 way to get to zero(You pick no coins).
		__A    =							1

		# Pick all coins one by one and update table[] values
		# after the index greater than or equal to the value of the
		# picked coin
		for coin_val in s:
				for j in range(lowerCAmelCase__					,     n + 1	):
						table[j] += table[j - coin_val]

		return table[n]


if __name__ == "__main__":
					import doctest

					doctest.testmod()

