


from __future__ import annotations

import math






class      UpperCamelCase					:


   '''simple docstring'''







   def __init__(     self   ,							UpperCamelCase_		):
        lowercase_       :Dict     =       size
        # approximate the overall size of segment tree with given value
        lowercase_       :Dict     =       [0 for i in range(0   ,							4 * size		)]
        # create array to store lazy update
        lowercase_       :Optional[Any]     =       [0 for i in range(0   ,							4 * size		)]
        lowercase_       :Tuple     =       [0 for i in range(0   ,							4 * size		)]  # flag for lazy update
   def 		UpperCamelCase  (     self   ,							UpperCamelCase_		):
        return idx * 2
   def 		UpperCamelCase  (     self   ,							UpperCamelCase_		):
        return idx * 2 + 1
   def 		UpperCamelCase  (     self   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		):
        if left_element == right_element:
             lowercase_       :Tuple     =       a[left_element - 1]
        else:
             lowercase_       :Any     =       (left_element + right_element) // 2
             self.build(self.left(UpperCamelCase_		)   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		)
             self.build(self.right(UpperCamelCase_		)   ,							mid + 1   ,							UpperCamelCase_   ,							UpperCamelCase_		)
             lowercase_       :Union[str, Any]     =       max(
                 self.segment_tree[self.left(UpperCamelCase_		)]   ,							self.segment_tree[self.right(UpperCamelCase_		)]		)
   def 		UpperCamelCase  (     self   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		):
        if self.flag[idx] is True:
             lowercase_       :Optional[int]     =       self.lazy[idx]
             lowercase_       :Optional[int]     =       False
             if left_element != right_element:
                  lowercase_       :str     =       self.lazy[idx]
                  lowercase_       :str     =       self.lazy[idx]
                  lowercase_       :Union[str, Any]     =       True
                  lowercase_       :Optional[int]     =       True

        if right_element < a or left_element > b:
             return True
        if left_element >= a and right_element <= b:
             lowercase_       :List[str]     =       val
             if left_element != right_element:
                  lowercase_       :Tuple     =       val
                  lowercase_       :Optional[Any]     =       val
                  lowercase_       :Union[str, Any]     =       True
                  lowercase_       :Optional[Any]     =       True
             return True
        lowercase_       :str     =       (left_element + right_element) // 2
        self.update(self.left(UpperCamelCase_		)   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		)
        self.update(self.right(UpperCamelCase_		)   ,							mid + 1   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		)
        lowercase_       :int     =       max(
            self.segment_tree[self.left(UpperCamelCase_		)]   ,							self.segment_tree[self.right(UpperCamelCase_		)]		)
        return True
   def 		UpperCamelCase  (     self   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		):
        if self.flag[idx] is True:
             lowercase_       :Optional[int]     =       self.lazy[idx]
             lowercase_       :Tuple     =       False
             if left_element != right_element:
                  lowercase_       :Tuple     =       self.lazy[idx]
                  lowercase_       :List[Any]     =       self.lazy[idx]
                  lowercase_       :str     =       True
                  lowercase_       :int     =       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]
        lowercase_       :str     =       (left_element + right_element) // 2
        lowercase_       :Dict     =       self.query(self.left(UpperCamelCase_		)   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		)
        lowercase_       :Union[str, Any]     =       self.query(self.right(UpperCamelCase_		)   ,							mid + 1   ,							UpperCamelCase_   ,							UpperCamelCase_   ,							UpperCamelCase_		)
        return max(UpperCamelCase_   ,							UpperCamelCase_		)




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


if __name__ == "__main__":
   SCREAMING_SNAKE_CASE       :		Tuple         =				[1, 2, -4, 7, 3, -5, 6, 11, -20, 9, 14, 15, 5, 2, -8]
   SCREAMING_SNAKE_CASE       :		Dict         =				15
   SCREAMING_SNAKE_CASE       :		Any         =				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)





import math

SCREAMING_SNAKE_CASE       :		List[str]         =				10
SCREAMING_SNAKE_CASE       :		Dict         =				7
SCREAMING_SNAKE_CASE       :		int         =				BALLS_PER_COLOUR * NUM_COLOURS




def     UpperCamelCase    (      _a = 2_0		)					->							str:
     '''simple docstring'''





     lowercase_       :List[str]     =       math.comb(_a       ,		_a		)
     lowercase_       :Tuple     =       math.comb(NUM_BALLS - BALLS_PER_COLOUR       ,		_a		)

     lowercase_       :Dict     =       NUM_COLOURS * (1 - missing_colour / total)

     return f"{result:.9f}"


if __name__ == "__main__":
   print(solution(20))

