
"""simple docstring"""






_lowercase							 =							[
    [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
]



def     lowerCAmelCase__ (		__magic_name__ ,      __magic_name__ ,      __magic_name__ ,      __magic_name__			)	->bool:
						return 0 <= row < rows and 0 <= col < cols



def     lowerCAmelCase__ (		__magic_name__ ,      __magic_name__ ,      __magic_name__ ,      __magic_name__			)	->int:
						__lowercase						      =					len(__lowerCAmelCase			)
						__lowercase						      =					len(mat[0]			)
						if is_safe(__lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase			) and (row, col) not in seen and mat[row][col] == 1:
												seen.add((row, col)			)
												return (
												    1
												    + depth_first_search(row + 1 ,      __lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase			)
												    + depth_first_search(row - 1 ,      __lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase			)
												    + depth_first_search(__lowerCAmelCase ,      col + 1 ,      __lowerCAmelCase ,      __lowerCAmelCase			)
												    + depth_first_search(__lowerCAmelCase ,      col - 1 ,      __lowerCAmelCase ,      __lowerCAmelCase			)
												)
						else:
												return 0



def     lowerCAmelCase__ (		__magic_name__			)	->int:
						__lowercase						      =					set()

						__lowercase						      =					0
						for row, line in enumerate(__lowerCAmelCase			):
												for col, item in enumerate(__lowerCAmelCase			):
																		if item == 1 and (row, col) not in seen:
																								# Maximizing the area
																								__lowercase						      =					max(__lowerCAmelCase ,      depth_first_search(__lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase ,      __lowerCAmelCase			)			)
						return max_area


if __name__ == "__main__":
					import doctest

					print(find_max_area(matrix))  # Output -> 6
					doctest.testmod()







"""simple docstring"""






from scipy.constants import g



def     lowerCAmelCase__ (		__magic_name__ ,      __magic_name__			)	->float:
			if mass < 0:
						# handling of negative values of mass
						raise ValueError("The mass of a body cannot be negative"			)
			if height < 0:
						# handling of negative values of height
						raise ValueError("The height above the ground cannot be negative"			)
			return mass * g * height


if __name__ == "__main__":
					from doctest import testmod

					testmod(name='''potential_energy''')





