
'''simple docstring'''





UpperCAmelCase            = [
    [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   A			(							A_				:       int     ,				A_				:       int     ,				A_				:       int     ,				A_				:       int							):
						return 0 <= row < rows and 0 <= col < cols

def   A			(							A_				:       int     ,				A_				:       int     ,				A_				:       set     ,				A_				:       list[list[int]]							):
						snake_case							:  int			=     len(A_							)
						snake_case							:  List[Any]			=     len(mat[0]							)
						if is_safe(A_     ,				A_     ,				A_     ,				A_							) and (row, col) not in seen and mat[row][col] == 1:
												seen.add((row, col)							)
												return (
												    1
												    + depth_first_search(row + 1     ,				A_     ,				A_     ,				A_							)
												    + depth_first_search(row - 1     ,				A_     ,				A_     ,				A_							)
												    + depth_first_search(A_     ,				col + 1     ,				A_     ,				A_							)
												    + depth_first_search(A_     ,				col - 1     ,				A_     ,				A_							)
												)
						else:
												return 0

def   A			(							A_				:       list[list[int]]							):
						snake_case							:  set			=     set()

						snake_case							:  List[Any]			=     0
						for row, line in enumerate(A_							):
												for col, item in enumerate(A_							):
																		if item == 1 and (row, col) not in seen:
																								# Maximizing the area
																								snake_case							:  Union[str, Any]			=     max(A_     ,				depth_first_search(A_     ,				A_     ,				A_     ,				A_							)							)
						return max_area


if __name__ == "__main__":
						import doctest

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









"""simple docstring"""







from typing import TYPE_CHECKING

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


__a							:						Tuple   							=			{}

try:
	if not is_sentencepiece_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__a							:						str   							=			['CpmTokenizer']

try:
	if not is_tokenizers_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__a							:						List[str]   							=			['CpmTokenizerFast']


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

	try:
		if not is_tokenizers_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_cpm_fast import CpmTokenizerFast

else:
	import sys

	__a							:						Tuple   							=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


