

'''simple docstring'''
def  a__       (    _SCREAMING_SNAKE_CASE   :       list[int]	,				_SCREAMING_SNAKE_CASE   :       list[int]	,				_SCREAMING_SNAKE_CASE   :       int				)     ->					bool:


	"""simple docstring"""





	return not any(
	    neighbour == 1 and colored_vertices[i] == color
	    for i, neighbour in enumerate(_SCREAMING_SNAKE_CASE				)				)


def  a__       (    _SCREAMING_SNAKE_CASE   :       list[list[int]]	,				_SCREAMING_SNAKE_CASE   :       int	,				_SCREAMING_SNAKE_CASE   :       list[int]	,				_SCREAMING_SNAKE_CASE   :       int				)     ->					bool:


	"""simple docstring"""





	if index == len(_SCREAMING_SNAKE_CASE				):
		return True

	# Recursive Step
	for i in range(_SCREAMING_SNAKE_CASE				):
		if valid_coloring(graph[index]	,				_SCREAMING_SNAKE_CASE	,				_SCREAMING_SNAKE_CASE				):
			# Color current vertex
			UpperCAmelCase_     :      Optional[Any]						=  i
			# Validate coloring
			if util_color(_SCREAMING_SNAKE_CASE	,				_SCREAMING_SNAKE_CASE	,				_SCREAMING_SNAKE_CASE	,				index + 1				):
				return True
			# Backtrack
			UpperCAmelCase_     :      Tuple						=  -1
	return False





def  a__       (    _SCREAMING_SNAKE_CASE   :       list[list[int]]	,				_SCREAMING_SNAKE_CASE   :       int				)     ->					list[int]:


	"""simple docstring"""





	UpperCAmelCase_     :      Tuple						=  [-1] * len(_SCREAMING_SNAKE_CASE				)

	if util_color(_SCREAMING_SNAKE_CASE	,				_SCREAMING_SNAKE_CASE	,				_SCREAMING_SNAKE_CASE	,				0				):
		return colored_vertices

	return []






'''simple docstring'''



from itertools import product


def A (__lowerCamelCase :int					,      __lowerCamelCase :int						):
						_lowerCAmelCase    		=					sides_number
						_lowerCAmelCase    		=					max_face_number * dice_number
						_lowerCAmelCase    		=					[0] * (max_total + 1)

						_lowerCAmelCase    		=					1
						_lowerCAmelCase    		=					range(__lowerCamelCase					,      max_face_number + 1						)
						for dice_numbers in product(__lowerCamelCase					,      repeat=__lowerCamelCase						):
												_lowerCAmelCase    		=					sum(__lowerCamelCase						)
												totals_frequencies[total] += 1

						return totals_frequencies


def A ():
						_lowerCAmelCase    		=					total_frequency_distribution(
						    sides_number=4					,      dice_number=9						)
						_lowerCAmelCase    		=					total_frequency_distribution(
						    sides_number=6					,      dice_number=6						)

						_lowerCAmelCase    		=					0
						_lowerCAmelCase    		=					9
						_lowerCAmelCase    		=					4 * 9
						_lowerCAmelCase    		=					6
						for peter_total in range(__lowerCamelCase					,      max_peter_total + 1						):
												peter_wins_count += peter_totals_frequencies[peter_total] * sum(
												    colin_totals_frequencies[min_colin_total:peter_total]						)

						_lowerCAmelCase    		=					(4**9) * (6**6)
						_lowerCAmelCase    		=					peter_wins_count / total_games_number

						_lowerCAmelCase    		=					round(__lowerCamelCase					,      ndigits=7						)

						return rounded_peter_win_probability


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