






from __future__ import annotations

import math


class        __UpperCamelCase    :







	def __init__(  self      :							Tuple       ,				_lowerCAmelCase      :							Dict			)		-> Tuple:
		"""simple docstring"""







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







	def  _a   (  self      :							Tuple       ,				_lowerCAmelCase      :							Any			)		-> Optional[int]:
		"""simple docstring"""







		return idx * 2







	def  _a   (  self      :							Dict       ,				_lowerCAmelCase      :							Union[str, Any]			)		-> Any:
		"""simple docstring"""







		return idx * 2 + 1







	def  _a   (  self      :							Dict       ,				_lowerCAmelCase      :							Any       ,				_lowerCAmelCase      :							Any       ,				_lowerCAmelCase      :							int       ,				_lowerCAmelCase      :							Dict			)		-> int:
		"""simple docstring"""







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







	def  _a   (  self      :							str       ,				_lowerCAmelCase      :							int       ,				_lowerCAmelCase      :							Optional[int]       ,				_lowerCAmelCase      :							Any       ,				_lowerCAmelCase      :							Optional[int]       ,				_lowerCAmelCase      :							List[str]       ,				_lowerCAmelCase      :							Optional[Any]			)		-> Optional[Any]:
		"""simple docstring"""







		if self.flag[idx] is True:
			__lowercase             =  self.lazy[idx]
			__lowercase             =  False
			if left_element != right_element:
				__lowercase             =  self.lazy[idx]
				__lowercase             =  self.lazy[idx]
				__lowercase             =  True
				__lowercase             =  True

		if right_element < a or left_element > b:
			return True
		if left_element >= a and right_element <= b:
			__lowercase             =  val
			if left_element != right_element:
				__lowercase             =  val
				__lowercase             =  val
				__lowercase             =  True
				__lowercase             =  True
			return True
		__lowercase             =  (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			)
		__lowercase             =  max(
		    self.segment_tree[self.left(_lowerCAmelCase			)]       ,				self.segment_tree[self.right(_lowerCAmelCase			)]			)
		return True







	def  _a   (  self      :							List[str]       ,				_lowerCAmelCase      :							str       ,				_lowerCAmelCase      :							List[Any]       ,				_lowerCAmelCase      :							int       ,				_lowerCAmelCase      :							List[Any]       ,				_lowerCAmelCase      :							Optional[int]			)		-> Dict:
		"""simple docstring"""







		if self.flag[idx] is True:
			__lowercase             =  self.lazy[idx]
			__lowercase             =  False
			if left_element != right_element:
				__lowercase             =  self.lazy[idx]
				__lowercase             =  self.lazy[idx]
				__lowercase             =  True
				__lowercase             =  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             =  (left_element + right_element) // 2
		__lowercase             =  self.query(self.left(_lowerCAmelCase			)       ,				_lowerCAmelCase       ,				_lowerCAmelCase       ,				_lowerCAmelCase       ,				_lowerCAmelCase			)
		__lowercase             =  self.query(self.right(_lowerCAmelCase			)       ,				mid + 1       ,				_lowerCAmelCase       ,				_lowerCAmelCase       ,				_lowerCAmelCase			)
		return max(_lowerCAmelCase       ,				_lowerCAmelCase			)







	def __str__(  self      :							Any			)		-> List[str]:
		"""simple docstring"""







		return str([self.query(1       ,				1       ,				self.size       ,				_lowerCAmelCase       ,				_lowerCAmelCase			) for i in range(1       ,				self.size + 1			)]			)


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














def 				snake_case  (     lowerCamelCase					):




	'''simple docstring'''







	if not isinstance(lowerCamelCase				,  lowerCamelCase					):
		raise ValueError("""check_bouncy() accepts only integer arguments"""					)
	__lowercase             =  str(lowerCamelCase					)
	__lowercase             =  """""".join(sorted(lowerCamelCase					)					)
	return sorted_str_n != str_n and sorted_str_n[::-1] != str_n





def 				snake_case  (     lowerCamelCase = 99					):




	'''simple docstring'''







	if not 0 < percent < 100:
		raise ValueError("""solution() only accepts values from 0 to 100"""					)
	__lowercase             =  0
	__lowercase             =  1

	while True:
		if check_bouncy(lowerCamelCase					):
			bouncy_num += 1
		if (bouncy_num / num) * 100 >= percent:
			return num
		num += 1


if __name__ == "__main__":
						from doctest import testmod

						testmod()
						print(F'''{solution(99)}''')

