



from collections import defaultdict

from graphs.minimum_spanning_tree_prims import prisms_algorithm as mst






def 			lowerCAmelCase__	(					):





    '''simple docstring'''

    lowerCAmelCase__		,	lowerCAmelCase__  :       Optional[Any]				=  9, 14  # noqa: F841
    lowerCAmelCase__  :       Optional[Any]				=  [
        [0, 1, 4],
        [0, 7, 8],
        [1, 2, 8],
        [7, 8, 7],
        [7, 6, 1],
        [2, 8, 2],
        [8, 6, 6],
        [2, 3, 7],
        [2, 5, 4],
        [6, 5, 2],
        [3, 5, 14],
        [3, 4, 9],
        [5, 4, 10],
        [1, 7, 11],
    ]

    lowerCAmelCase__  :       str				=  defaultdict(a__)
    for nodea, nodea, cost in edges:
        adjancency[nodea].append([nodea, cost])
        adjancency[nodea].append([nodea, cost])

    lowerCAmelCase__  :       Optional[Any]				=  mst(a__)

    lowerCAmelCase__  :       int				=  [
        [7, 6, 1],
        [2, 8, 2],
        [6, 5, 2],
        [0, 1, 4],
        [2, 5, 4],
        [2, 3, 7],
        [0, 7, 8],
        [3, 4, 9],
    ]

    for answer in expected:
        lowerCAmelCase__  :       Dict				=  tuple(answer[:2])
        lowerCAmelCase__  :       Union[str, Any]				=  tuple(edge[::-1])
        assert edge in result or reverse in result






def 			lowerCAmelCase__	(					lowerCamelCase_	:	Any ,lowerCamelCase_	:	Optional[Any]):





				'''simple docstring'''

				lowerCAmelCase__  :       str				=  [0 for i in range(r + 1)]
				# nc0 = 1
				lowerCAmelCase__  :       Tuple				=  1
				for i in range(1 ,n + 1):
								# to compute current row from previous row.
								lowerCAmelCase__  :       Optional[int]				=  min(lowerCamelCase_ ,lowerCamelCase_)
								while j > 0:
												c[j] += c[j - 1]
												j -= 1
				return c[r]

print(binomial_coefficient(n=1_0, r=5))

