



'''simple docstring'''




UpperCamelCase__	:     Optional[int]    =			[
    [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_       (     _lowerCamelCase:       int	,				_lowerCamelCase:       int	,				_lowerCamelCase:       int	,				_lowerCamelCase:       int ):
		return 0 <= row < rows and 0 <= col < cols


def     lowerCAmelCase_       (     _lowerCamelCase:       int	,				_lowerCamelCase:       int	,				_lowerCamelCase:       set	,				_lowerCamelCase:       list[list[int]] ):
		__SCREAMING_SNAKE_CASE	:		Optional[Any]   	=		len(_lowerCamelCase )
		__SCREAMING_SNAKE_CASE	:		Tuple   	=		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_       (     _lowerCamelCase:       list[list[int]] ):
		__SCREAMING_SNAKE_CASE	:		set   	=		set()

		__SCREAMING_SNAKE_CASE	:		Any   	=		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
								__SCREAMING_SNAKE_CASE	:		int   	=		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 __future__ import annotations


def     lowerCAmelCase_       (     _lowerCamelCase:       list[int | float] ):
		if len(_lowerCamelCase ) == 0:
				raise ValueError("""find_min() arg is an empty sequence""" )
		__SCREAMING_SNAKE_CASE	:		List[str]   	=		nums[0]
		for num in nums:
				__SCREAMING_SNAKE_CASE	:		int   	=		min(_lowerCamelCase	,				_lowerCamelCase )
		return min_num


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)