

import os


def 					_UpperCAmelCase				(						a__):

			'''simple docstring'''



			a_						:						Tuple 							= len(grid[0])
			a_						:						Any 							= len(a__)

			a_						:						Tuple 							= 0
			a_						:						Optional[int] 							= 0
			a_						:						Any 							= 0

			# Check vertically, horizontally, diagonally at the same time (only works
			# for nxn grid)
			for i in range(a__):
						for j in range(n_rows - 3):
									a_						:						Tuple 							= grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
									a_						:						Tuple 							= grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

									# Left-to-right diagonal (\) product
									if i < n_columns - 3:
												a_						:						Any 							= (
												    grid[i][j]
												    * grid[i + 1][j + 1]
												    * grid[i + 2][j + 2]
												    * grid[i + 3][j + 3]
												)

									# Right-to-left diagonal(/) product
									if i > 2:
												a_						:						List[str] 							= (
												    grid[i][j]
												    * grid[i - 1][j + 1]
												    * grid[i - 2][j + 2]
												    * grid[i - 3][j + 3]
												)

									a_						:						List[str] 							= max(
									    a__  ,	a__  ,	a__  ,	a__)
									if max_product > largest:
												a_						:						List[Any] 							= max_product

			return largest


def 					_UpperCAmelCase				(						):

			'''simple docstring'''



			a_						:						Optional[int] 							= []
			with open(os.path.dirname(a__) + """/grid.txt""") as file:
						for line in file:
									grid.append(line.strip("""\n""").split(""" """))

			a_						:						int 							= [[int(a__) for i in grid[j]] for j in range(len(a__))]

			return largest_product(a__)


if __name__ == "__main__":
	print(solution())





from random import randint
from tempfile import TemporaryFile

import numpy as np


def 					_UpperCAmelCase				(						a__  ,	a__  ,	a__):

			'''simple docstring'''



			a_						:						List[Any] 							= 0
			if start < end:
						a_						:						Dict 							= randint(a__  ,	a__)
						a_						:						List[str] 							= a[end]
						a_						:						Tuple 							= a[pivot]
						a_						:						Tuple 							= temp

						a_							,					a_						:						List[Any] 							= _in_place_partition(a__  ,	a__  ,	a__)
						count += _in_place_quick_sort(a__  ,	a__  ,	p - 1)
						count += _in_place_quick_sort(a__  ,	p + 1  ,	a__)
			return count


def 					_UpperCAmelCase				(						a__  ,	a__  ,	a__):

			'''simple docstring'''



			a_						:						Optional[int] 							= 0
			a_						:						Union[str, Any] 							= randint(a__  ,	a__)
			a_						:						Union[str, Any] 							= a[end]
			a_						:						Any 							= a[pivot]
			a_						:						Any 							= temp
			a_						:						int 							= start - 1
			for index in range(a__  ,	a__):
						count += 1
						if a[index] < a[end]:  # check if current val is less than pivot value
									a_						:						str 							= new_pivot_index + 1
									a_						:						Optional[Any] 							= a[new_pivot_index]
									a_						:						str 							= a[index]
									a_						:						Union[str, Any] 							= temp

			a_						:						Union[str, Any] 							= a[new_pivot_index + 1]
			a_						:						Tuple 							= a[end]
			a_						:						Any 							= temp
			return new_pivot_index + 1, count


__snake_case				:      Union[str, Any]   		=			TemporaryFile()
__snake_case				:      Dict   		=			1_00  # 1000 elements are to be sorted


__snake_case		, __snake_case				:      int   		=			0, 1  # mean and standard deviation
__snake_case				:      Tuple   		=			np.random.normal(mu, sigma, p)
np.save(outfile, X)
print("""The array is""")
print(X)


outfile.seek(0)  # using the same array
__snake_case				:      str   		=			np.load(outfile)
__snake_case				:      Dict   		=			len(M) - 1
__snake_case				:      Dict   		=			_in_place_quick_sort(M, 0, r)

print(
    """No of Comparisons for 100 elements selected from a standard normal distribution"""
    """is :"""
)



print(z)


