




a_ 		=  [
    [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        __SCREAMING_SNAKE_CASE (	lowercase_       ,  lowercase_       ,  lowercase_       ,  lowercase_   )							->						bool:

    """simple docstring"""


    return 0 <= row < rows and 0 <= col < cols




def        __SCREAMING_SNAKE_CASE (	lowercase_       ,  lowercase_       ,  lowercase_       ,  lowercase_   )							->						int:

    """simple docstring"""


    __UpperCamelCase			=    len(lowercase_   )
    __UpperCamelCase			=    len(mat[0]   )
    if is_safe(lowercase_       ,  lowercase_       ,  lowercase_       ,  lowercase_   ) and (row, col) not in seen and mat[row][col] == 1:
        seen.add((row, col)   )
        return (
            1
            + depth_first_search(row + 1       ,  lowercase_       ,  lowercase_       ,  lowercase_   )
            + depth_first_search(row - 1       ,  lowercase_       ,  lowercase_       ,  lowercase_   )
            + depth_first_search(lowercase_       ,  col + 1       ,  lowercase_       ,  lowercase_   )
            + depth_first_search(lowercase_       ,  col - 1       ,  lowercase_       ,  lowercase_   )
        )
    else:
        return 0




def        __SCREAMING_SNAKE_CASE (	lowercase_   )							->						int:

    """simple docstring"""


    __UpperCamelCase			=    set()

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


if __name__ == "__main__":
 import doctest

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











from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


UpperCAmelCase__			:   Optional[Any]      			=    {}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase__			:   List[Any]      			=    ['MBart50Tokenizer']

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase__			:   int      			=    ['MBart50TokenizerFast']


if TYPE_CHECKING:
					try:
										if not is_sentencepiece_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_mbartaa import MBartaaTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_mbartaa_fast import MBartaaTokenizerFast

else:
					import sys

					UpperCAmelCase__			:   str      			=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
