






"""simple docstring"""







from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowerCAmelCase            =	logging.get_logger(__name__)

_lowerCAmelCase            =	{
    'uw-madison/mra-base-512-4': 'https://huggingface.co/uw-madison/mra-base-512-4/resolve/main/config.json',
}


class      UpperCamelCase		(__snake_case     ):
						_SCREAMING_SNAKE_CASE  : str												=		"""mra"""






						def __init__(		self  :List[str]			, __magic_name__  :Any=50_265			, __magic_name__  :int=768			, __magic_name__  :Union[str, Any]=12			, __magic_name__  :Any=12			, __magic_name__  :List[str]=3_072			, __magic_name__  :Dict="gelu"			, __magic_name__  :Dict=0.1			, __magic_name__  :List[str]=0.1			, __magic_name__  :Optional[int]=512			, __magic_name__  :Dict=1			, __magic_name__  :List[str]=0.02			, __magic_name__  :Union[str, Any]=1E-5			, __magic_name__  :Optional[Any]="absolute"			, __magic_name__  :int=4			, __magic_name__  :Union[str, Any]="full"			, __magic_name__  :Tuple=0			, __magic_name__  :Optional[Any]=0			, __magic_name__  :List[Any]=1			, __magic_name__  :List[Any]=0			, __magic_name__  :Tuple=2			, **__magic_name__  :List[Any]			, )      ->Any:
										super().__init__(pad_token_id=__magic_name__			, bos_token_id=__magic_name__			, eos_token_id=__magic_name__			, **__magic_name__				)

										lowercase    :      List[Any]       = vocab_size
										lowercase    :      int       = max_position_embeddings
										lowercase    :      int       = hidden_size
										lowercase    :      Optional[int]       = num_hidden_layers
										lowercase    :      List[Any]       = num_attention_heads
										lowercase    :      Tuple       = intermediate_size
										lowercase    :      List[Any]       = hidden_act
										lowercase    :      str       = hidden_dropout_prob
										lowercase    :      Any       = attention_probs_dropout_prob
										lowercase    :      int       = initializer_range
										lowercase    :      Union[str, Any]       = type_vocab_size
										lowercase    :      Optional[Any]       = layer_norm_eps
										lowercase    :      Union[str, Any]       = position_embedding_type
										lowercase    :      Dict       = block_per_row
										lowercase    :      Tuple       = approx_mode
										lowercase    :      Union[str, Any]       = initial_prior_first_n_blocks
										lowercase    :      str       = initial_prior_diagonal_n_blocks








"""simple docstring"""







def      UpperCamelCase       ( _A  ,				_A )     ->       int:
				lowercase    :      int       = 1  # To kept the Calculated Value
				# Since C(n, k) = C(n, n-k)
				if k > (n - k):
								lowercase    :      List[Any]       = n - k
				# Calculate C(n,k)
				for i in range(_A ):
								result *= n - i
								result //= i + 1
				return result


def      UpperCamelCase       ( _A )     ->       int:
				return binomial_coefficient(2 * node_count  ,				_A ) // (node_count + 1)


def      UpperCamelCase       ( _A )     ->       int:
				if n < 0:
								raise ValueError("""factorial() not defined for negative values""" )
				lowercase    :      Union[str, Any]       = 1
				for i in range(1  ,				n + 1 ):
								result *= i
				return result


def      UpperCamelCase       ( _A )     ->       int:
				return catalan_number(_A ) * factorial(_A )


if __name__ == "__main__":
				_lowerCAmelCase            =	int(input('Enter the number of nodes: ').strip() or 0)
				if node_count <= 0:
								raise ValueError('We need some nodes to work with.')
				print(
				    F'Given {node_count} nodes, there are {binary_tree_count(node_count)} '
				    F'binary trees and {catalan_number(node_count)} binary search trees.'
				)
