






'''simple docstring'''







class _lowercase     :




							def __init__(							self:    str      ,							UpperCamelCase__:    int					):
														lowerCamelCase__ :     int	  =	size
														lowerCamelCase__ :     Optional[Any]	  =	[0] * size
														lowerCamelCase__ :     str	  =	[0] * size




							@staticmethod
							def 		lowerCamelCase_    (							UpperCamelCase__:    int					):
														return index | (index + 1)




							@staticmethod
							def 		lowerCamelCase_    (							UpperCamelCase__:    int					):
														return (index & (index + 1)) - 1




							def 		lowerCamelCase_    (							self:    Optional[int]      ,							UpperCamelCase__:    int      ,							UpperCamelCase__:    int					):
														lowerCamelCase__ :     int	  =	value
														while index < self.size:
																					lowerCamelCase__ :     Union[str, Any]	  =	self.get_prev(UpperCamelCase__					) + 1
																					if current_left_border == index:
																												lowerCamelCase__ :     Dict	  =	value
																					else:
																												lowerCamelCase__ :     List[Any]	  =	max(UpperCamelCase__      ,							UpperCamelCase__      ,							UpperCamelCase__					)
																					lowerCamelCase__ :     Optional[Any]	  =	self.get_next(UpperCamelCase__					)




							def 		lowerCamelCase_    (							self:    int      ,							UpperCamelCase__:    int      ,							UpperCamelCase__:    int					):
														right -= 1  # Because of right is exclusive
														lowerCamelCase__ :     Union[str, Any]	  =	0
														while left <= right:
																					lowerCamelCase__ :     Any	  =	self.get_prev(UpperCamelCase__					)
																					if left <= current_left:
																												lowerCamelCase__ :     Union[str, Any]	  =	max(UpperCamelCase__      ,							self.tree[right]					)
																												lowerCamelCase__ :     Tuple	  =	current_left
																					else:
																												lowerCamelCase__ :     Any	  =	max(UpperCamelCase__      ,							self.arr[right]					)
																												right -= 1
														return result


if __name__ == "__main__":
			import doctest

			doctest.testmod()









'''simple docstring'''







from math import asin, atan, cos, radians, sin, sqrt, tan

_A     :      List[str]   					=637_8137.0
_A     :      Dict   					=635_6752.31_4245
_A     :      int   					=6_378_137





def 			SCREAMING_SNAKE_CASE_	(UpperCamelCase    ,      UpperCamelCase    ,      UpperCamelCase    ,      UpperCamelCase				)				->	float:
							lowerCamelCase__ :     str	  =	(AXIS_A - AXIS_B) / AXIS_A
							lowerCamelCase__ :     Dict	  =	atan((1 - flattening) * tan(radians(UpperCamelCase				)				)				)
							lowerCamelCase__ :     Dict	  =	atan((1 - flattening) * tan(radians(UpperCamelCase				)				)				)
							lowerCamelCase__ :     Optional[Any]	  =	radians(UpperCamelCase				)
							lowerCamelCase__ :     List[Any]	  =	radians(UpperCamelCase				)
							# Equation
							lowerCamelCase__ :     Tuple	  =	sin((phi_a - phi_a) / 2				)
							lowerCamelCase__ :     List[Any]	  =	sin((lambda_a - lambda_a) / 2				)
							# Square both values
							sin_sq_phi *= sin_sq_phi
							sin_sq_lambda *= sin_sq_lambda
							lowerCamelCase__ :     Tuple	  =	sqrt(sin_sq_phi + (cos(UpperCamelCase				) * cos(UpperCamelCase				) * sin_sq_lambda)				)
							return 2 * RADIUS * asin(UpperCamelCase				)


if __name__ == "__main__":
			import doctest

			doctest.testmod()

