"""simple docstring"""


from __future__ import annotations

import math






class   __UpperCAmelCase		:

				def __init__( self      ,					_lowerCamelCase ):
										lowerCamelCase__   =size
										# approximate the overall size of segment tree with given value
										lowerCamelCase__   =[0 for i in range(0      ,					4 * size )]
										# create array to store lazy update
										lowerCamelCase__   =[0 for i in range(0      ,					4 * size )]
										lowerCamelCase__   =[0 for i in range(0      ,					4 * size )]  # flag for lazy update

				def 						_a      ( self      ,					_lowerCamelCase ):
										return idx * 2

				def 						_a      ( self      ,					_lowerCamelCase ):
										return idx * 2 + 1

				def 						_a      ( self      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase ):
										if left_element == right_element:
																lowerCamelCase__   =a[left_element - 1]
										else:
																lowerCamelCase__   =(left_element + right_element) // 2
																self.build(self.left(_lowerCamelCase )      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase )
																self.build(self.right(_lowerCamelCase )      ,					mid + 1      ,					_lowerCamelCase      ,					_lowerCamelCase )
																lowerCamelCase__   =max(
																    self.segment_tree[self.left(_lowerCamelCase )]      ,					self.segment_tree[self.right(_lowerCamelCase )] )

				def 						_a      ( self      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase ):
										if self.flag[idx] is True:
																lowerCamelCase__   =self.lazy[idx]
																lowerCamelCase__   =False
																if left_element != right_element:
																						lowerCamelCase__   =self.lazy[idx]
																						lowerCamelCase__   =self.lazy[idx]
																						lowerCamelCase__   =True
																						lowerCamelCase__   =True

										if right_element < a or left_element > b:
																return True
										if left_element >= a and right_element <= b:
																lowerCamelCase__   =val
																if left_element != right_element:
																						lowerCamelCase__   =val
																						lowerCamelCase__   =val
																						lowerCamelCase__   =True
																						lowerCamelCase__   =True
																return True
										lowerCamelCase__   =(left_element + right_element) // 2
										self.update(self.left(_lowerCamelCase )      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase )
										self.update(self.right(_lowerCamelCase )      ,					mid + 1      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase )
										lowerCamelCase__   =max(
										    self.segment_tree[self.left(_lowerCamelCase )]      ,					self.segment_tree[self.right(_lowerCamelCase )] )
										return True

				def 						_a      ( self      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase ):
										if self.flag[idx] is True:
																lowerCamelCase__   =self.lazy[idx]
																lowerCamelCase__   =False
																if left_element != right_element:
																						lowerCamelCase__   =self.lazy[idx]
																						lowerCamelCase__   =self.lazy[idx]
																						lowerCamelCase__   =True
																						lowerCamelCase__   =True
										if right_element < a or left_element > b:
																return -math.inf
										if left_element >= a and right_element <= b:
																return self.segment_tree[idx]
										lowerCamelCase__   =(left_element + right_element) // 2
										lowerCamelCase__   =self.query(self.left(_lowerCamelCase )      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase )
										lowerCamelCase__   =self.query(self.right(_lowerCamelCase )      ,					mid + 1      ,					_lowerCamelCase      ,					_lowerCamelCase      ,					_lowerCamelCase )
										return max(_lowerCamelCase      ,					_lowerCamelCase )






				def __str__( self ):
										return str([self.query(1      ,					1      ,					self.size      ,					_lowerCamelCase      ,					_lowerCamelCase ) for i in range(1      ,					self.size + 1 )] )


if __name__ == "__main__":
	a				=[1, 2, -4, 7, 3, -5, 6, 11, -20, 9, 14, 15, 5, 2, -8]
	a				=15
	a				=SegmentTree(size)
	segt.build(1, 1, size, A)
	print(segt.query(1, 1, size, 4, 6))
	print(segt.query(1, 1, size, 7, 11))
	print(segt.query(1, 1, size, 7, 12))
	segt.update(1, 1, size, 1, 3, 111)
	print(segt.query(1, 1, size, 1, 15))
	segt.update(1, 1, size, 7, 8, 235)
	print(segt)



"""simple docstring"""


def      lowerCamelCase_					(   __lowerCAmelCase  ,       __lowerCAmelCase							)				->   float:




						'''simple docstring'''



						return price * (1 + tax_rate)


if __name__ == "__main__":
	print(F'''{price_plus_tax(100, 0.25) = }''')
	print(F'''{price_plus_tax(125.50, 0.05) = }''')


