
"""simple docstring"""


def       _snake_case				(		snake_case__   :     list[int]	,      snake_case__   :     int     ):
	A						   =   len(snake_case__     )
	A						   =   [[False] * (required_sum + 1) for _ in range(arr_len + 1     )]

	# for each arr value, a sum of zero(0) can be formed by not taking any element
	# hence True/1
	for i in range(arr_len + 1     ):
		A						   =   True

	# sum is not zero and set is empty then false
	for i in range(1	,      required_sum + 1     ):
		A						   =   False

	for i in range(1	,      arr_len + 1     ):
		for j in range(1	,      required_sum + 1     ):
			if arr[i - 1] > j:
				A						   =   subset[i - 1][j]
			if arr[i - 1] <= j:
				A						   =   subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

	return subset[arr_len][required_sum]


if __name__ == "__main__":
		import doctest

		doctest.testmod()

"""simple docstring"""


def       _snake_case				(		snake_case__   :     list	,      snake_case__   :     list	,      snake_case__   :     int     ):
	A						   =   len(snake_case__     )
	A						   =   [[0] * n for i in range(snake_case__     )]
	for i in range(snake_case__     ):
		A						   =   y_points[i]

	for i in range(2	,      snake_case__     ):
		for j in range(snake_case__	,      snake_case__     ):
			A						   =   (
			    (xa - x_points[j - i + 1]) * q[j][i - 1]
			    - (xa - x_points[j]) * q[j - 1][i - 1]
			) / (x_points[j] - x_points[j - i + 1])

	return [q[n - 1][n - 1], q]


if __name__ == "__main__":
		import doctest

		doctest.testmod()