"""simple docstring"""





def   lowerCamelCase_(__SCREAMING_SNAKE_CASE	)->     bool:
							if not isinstance(UpperCamelCase__  ,						UpperCamelCase__	):
														raise ValueError("""Input series is not valid, valid series - [2, 4, 6]"""	)
							if len(UpperCamelCase__	) == 0:
														raise ValueError("""Input list must be a non empty list"""	)
							if len(UpperCamelCase__	) == 1:
														return True
							_SCREAMING_SNAKE_CASE		:    str      	=     series[1] - series[0]
							for index in range(len(UpperCamelCase__	) - 1	):
														if series[index + 1] - series[index] != common_diff:
																					return False
							return True



def   lowerCamelCase_(__SCREAMING_SNAKE_CASE	)->     float:
							if not isinstance(UpperCamelCase__  ,						UpperCamelCase__	):
														raise ValueError("""Input series is not valid, valid series - [2, 4, 6]"""	)
							if len(UpperCamelCase__	) == 0:
														raise ValueError("""Input list must be a non empty list"""	)
							_SCREAMING_SNAKE_CASE		:    Union[str, Any]      	=     0
							for val in series:
														answer += val
							return answer / len(UpperCamelCase__	)


if __name__ == "__main__":
			import doctest

			doctest.testmod()









class        SCREAMING_SNAKE_CASE__					:



 def __init__(				self,__lowerCamelCase					):
        A__		   =		size
        A__		   =		[0] * size
        A__		   =		[0] * size



 @staticmethod
 def 							UpperCamelCase     (				__lowerCamelCase					):
        return index | (index + 1)



 @staticmethod
 def 							UpperCamelCase     (				__lowerCamelCase					):
        return (index & (index + 1)) - 1



 def 							UpperCamelCase     (				self,__lowerCamelCase,__lowerCamelCase					):
        A__		   =		value
        while index < self.size:
               A__		   =		self.get_prev(__lowerCamelCase					) + 1
               if current_left_border == index:
                      A__		   =		value
               else:
                      A__		   =		max(__lowerCamelCase,__lowerCamelCase,__lowerCamelCase					)
               A__		   =		self.get_next(__lowerCamelCase					)




 def 							UpperCamelCase     (				self,__lowerCamelCase,__lowerCamelCase					):
        right -= 1  # Because of right is exclusive
        A__		   =		0
        while left <= right:
               A__		   =		self.get_prev(__lowerCamelCase					)
               if left <= current_left:
                      A__		   =		max(__lowerCamelCase,self.tree[right]					)
                      A__		   =		current_left
               else:
                      A__		   =		max(__lowerCamelCase,self.arr[right]					)
                      right -= 1
        return result


if __name__ == "__main__":
       import doctest

       doctest.testmod()





