
'''simple docstring'''
from copy import deepcopy






class    UpperCAmelCase_				:





 def __init__(    self ,       lowercase_ = None ,       lowercase_ = None):

     if arr is None and size is not None:
         snake_case_ :    Tuple     			=						size
         snake_case_ :    List[Any]     			=						[0] * size
     elif arr is not None:
         self.init(lowercase_)
     else:
         raise ValueError("Either arr or size must be specified")





 def        snake_case__		(    self ,       lowercase_):
     snake_case_ :    Tuple     			=						len(lowercase_)
     snake_case_ :    List[str]     			=						deepcopy(lowercase_)
     for i in range(1 ,       self.size):
         snake_case_ :    int     			=						self.next_(lowercase_)
         if j < self.size:
             self.tree[j] += self.tree[i]





 def        snake_case__		(    self):
     snake_case_ :    Optional[Any]     			=						self.tree[:]
     for i in range(self.size - 1 ,       0 ,       -1):
         snake_case_ :    str     			=						self.next_(lowercase_)
         if j < self.size:
             arr[j] -= arr[i]
     return arr





 @staticmethod
 def        snake_case__		(    lowercase_):
     return index + (index & (-index))





 @staticmethod
 def        snake_case__		(    lowercase_):
     return index - (index & (-index))





 def        snake_case__		(    self ,       lowercase_ ,       lowercase_):
     if index == 0:
         self.tree[0] += value
         return
     while index < self.size:
         self.tree[index] += value
         snake_case_ :    Union[str, Any]     			=						self.next_(lowercase_)





 def        snake_case__		(    self ,       lowercase_ ,       lowercase_):
     self.add(lowercase_ ,       value - self.get(lowercase_))





 def        snake_case__		(    self ,       lowercase_):
     if right == 0:
         return 0
     snake_case_ :    List[Any]     			=						self.tree[0]
     right -= 1  # make right inclusive
     while right > 0:
         result += self.tree[right]
         snake_case_ :    List[str]     			=						self.prev(lowercase_)
     return result





 def        snake_case__		(    self ,       lowercase_ ,       lowercase_):
     return self.prefix(lowercase_) - self.prefix(lowercase_)





 def        snake_case__		(    self ,       lowercase_):
     return self.query(lowercase_ ,       index + 1)





 def        snake_case__		(    self ,       lowercase_):
     value -= self.tree[0]
     if value < 0:
         return -1

     snake_case_ :    int     			=						1  # Largest power of 2 <= size
     while j * 2 < self.size:
         j *= 2

     snake_case_ :    int     			=						0

     while j > 0:
         if i + j < self.size and self.tree[i + j] <= value:
             value -= self.tree[i + j]
             i += j
         j //= 2
     return i


if __name__ == "__main__":
  import doctest

  doctest.testmod()






'''simple docstring'''
from __future__ import annotations

from cmath import sqrt

def 						UpperCamelCase_     (	__SCREAMING_SNAKE_CASE,		__SCREAMING_SNAKE_CASE,		__SCREAMING_SNAKE_CASE       ):
    """simple docstring"""






    if a == 0:
        raise ValueError("Coefficient 'a' must not be zero."       )
    snake_case_ :    Union[str, Any]     			=						b * b - 4 * a * c

    snake_case_ :    List[str]     			=						(-b + sqrt(__SCREAMING_SNAKE_CASE       )) / (2 * a)
    snake_case_ :    int     			=						(-b - sqrt(__SCREAMING_SNAKE_CASE       )) / (2 * a)

    return (
        root_a.real if not root_a.imag else root_a,
        root_a.real if not root_a.imag else root_a,
    )

def 						UpperCamelCase_     (	):
    """simple docstring"""






    snake_case_			, snake_case_ :    str     			=						quadratic_roots(a=5,		b=6,		c=1       )
    print(f'The solutions are: {solutiona} and {solutiona}'       )


if __name__ == "__main__":
  main()




