



from __future__ import annotations

import math






def 	_lowerCAmelCase						(				__lowerCamelCase   :     int		,	__lowerCamelCase   :     int		,	__lowerCamelCase   :     bool		,	__lowerCamelCase   :     list[int]		,	__lowerCamelCase   :     float     ):



	"""simple docstring"""





	if depth < 0:
		raise ValueError("Depth cannot be less than 0"     )

	if not scores:
		raise ValueError("Scores cannot be empty"     )

	if depth == height:
		return scores[node_index]

	return (
	    max(
	        minimax(depth + 1		,	node_index * 2		,	__lowerCamelCase		,	__lowerCamelCase		,	__lowerCamelCase     )		,	minimax(depth + 1		,	node_index * 2 + 1		,	__lowerCamelCase		,	__lowerCamelCase		,	__lowerCamelCase     )		,	)
	    if is_max
	    else min(
	        minimax(depth + 1		,	node_index * 2		,	__lowerCamelCase		,	__lowerCamelCase		,	__lowerCamelCase     )		,	minimax(depth + 1		,	node_index * 2 + 1		,	__lowerCamelCase		,	__lowerCamelCase		,	__lowerCamelCase     )		,	)
	)






def 	_lowerCAmelCase						(				):



	"""simple docstring"""





	__SCREAMING_SNAKE_CASE       :    int       =	[90, 23, 6, 33, 21, 65, 123, 34423]
	__SCREAMING_SNAKE_CASE       :    str       =	math.log(len(__lowerCamelCase     )		,	2     )
	print(F"""Optimal value : {minimax(0		,	0		,	__lowerCamelCase		,	__lowerCamelCase		,	__lowerCamelCase     )}"""     )


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						main()











from math import sqrt






def 	_lowerCAmelCase						(				__lowerCamelCase   :     int = 1000000     ):



 """simple docstring"""





 __SCREAMING_SNAKE_CASE       :    int       =	0
 __SCREAMING_SNAKE_CASE       :    int       =	0
 __SCREAMING_SNAKE_CASE       :    int

 while num_cuboids <= limit:
  max_cuboid_size += 1
  for sum_shortest_sides in range(2		,	2 * max_cuboid_size + 1     ):
   if sqrt(sum_shortest_sides**2 + max_cuboid_size**2     ).is_integer():
    num_cuboids += (
        min(__lowerCamelCase		,	sum_shortest_sides // 2     )
        - max(1		,	sum_shortest_sides - max_cuboid_size     )
        + 1
    )

 return max_cuboid_size


if __name__ == "__main__":
      print(f'''{solution() = }''')






