



"""simple docstring"""





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


__lowerCAmelCase       :					Tuple      					=					logging.get_logger(__name__)

__lowerCAmelCase       :					Optional[Any]      					=					{
    "google/realm-cc-news-pretrained-embedder": (
        "https://huggingface.co/google/realm-cc-news-pretrained-embedder/resolve/main/config.json"
    ),
    "google/realm-cc-news-pretrained-encoder": (
        "https://huggingface.co/google/realm-cc-news-pretrained-encoder/resolve/main/config.json"
    ),
    "google/realm-cc-news-pretrained-scorer": (
        "https://huggingface.co/google/realm-cc-news-pretrained-scorer/resolve/main/config.json"
    ),
    "google/realm-cc-news-pretrained-openqa": (
        "https://huggingface.co/google/realm-cc-news-pretrained-openqa/aresolve/main/config.json"
    ),
    "google/realm-orqa-nq-openqa": "https://huggingface.co/google/realm-orqa-nq-openqa/resolve/main/config.json",
    "google/realm-orqa-nq-reader": "https://huggingface.co/google/realm-orqa-nq-reader/resolve/main/config.json",
    "google/realm-orqa-wq-openqa": "https://huggingface.co/google/realm-orqa-wq-openqa/resolve/main/config.json",
    "google/realm-orqa-wq-reader": "https://huggingface.co/google/realm-orqa-wq-reader/resolve/main/config.json",
    # See all REALM models at https://huggingface.co/models?filter=realm
}



class    _lowerCAmelCase    (				SCREAMING_SNAKE_CASE__		):





		"""simple docstring"""






		_lowerCamelCase			  =       '''realm'''





		def __init__(					self							,    _lowercase=3_0_5_2_2							,    _lowercase=7_6_8							,    _lowercase=1_2_8							,    _lowercase=1_2							,    _lowercase=1_2							,    _lowercase=8							,    _lowercase=3_0_7_2							,    _lowercase="gelu_new"							,    _lowercase=0.1							,    _lowercase=0.1							,    _lowercase=5_1_2							,    _lowercase=2							,    _lowercase=0.02							,    _lowercase=1E-12							,    _lowercase=2_5_6							,    _lowercase=1_0							,    _lowercase=1E-3							,    _lowercase=5							,    _lowercase=3_2_0							,    _lowercase=1_3_3_5_3_7_1_8							,    _lowercase=5_0_0_0							,    _lowercase=1							,    _lowercase=0							,    _lowercase=2							,    **_lowercase							,    ) ->						List[Any]:







								'''simple docstring'''

								super().__init__(pad_token_id=__UpperCamelCase							,    bos_token_id=__UpperCamelCase							,    eos_token_id=__UpperCamelCase							,    **__UpperCamelCase   )

								# Common config
								snake_case_   : List[str]						=			vocab_size
								snake_case_   : Tuple						=			max_position_embeddings
								snake_case_   : int						=			hidden_size
								snake_case_   : int						=			retriever_proj_size
								snake_case_   : List[str]						=			num_hidden_layers
								snake_case_   : Optional[Any]						=			num_attention_heads
								snake_case_   : List[Any]						=			num_candidates
								snake_case_   : Dict						=			intermediate_size
								snake_case_   : int						=			hidden_act
								snake_case_   : Optional[int]						=			hidden_dropout_prob
								snake_case_   : Dict						=			attention_probs_dropout_prob
								snake_case_   : Tuple						=			initializer_range
								snake_case_   : Any						=			type_vocab_size
								snake_case_   : str						=			layer_norm_eps

								# Reader config
								snake_case_   : Tuple						=			span_hidden_size
								snake_case_   : Optional[int]						=			max_span_width
								snake_case_   : Dict						=			reader_layer_norm_eps
								snake_case_   : Any						=			reader_beam_size
								snake_case_   : List[str]						=			reader_seq_len

								# Retrieval config
								snake_case_   : Optional[Any]						=			num_block_records
								snake_case_   : str						=			searcher_beam_size






"""simple docstring"""





def 	__lowerCAmelCase						(		__UpperCamelCase      :			int					, __UpperCamelCase      :			int    ):


						'''simple docstring'''






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


						'''simple docstring'''






						return binomial_coefficient(2 * node_count					, __UpperCamelCase    ) // (node_count + 1)
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						if n < 0:
												raise ValueError("""factorial() not defined for negative values"""    )
						snake_case_   : Optional[int]						=			1
						for i in range(1					, n + 1    ):
												result *= i
						return result
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int    ):


						'''simple docstring'''






						return catalan_number(__UpperCamelCase    ) * factorial(__UpperCamelCase    )


if __name__ == "__main__":
					__lowerCAmelCase       :					Optional[Any]      					=					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.'''
					)

