def 					_snake_case	(  __snake_case						):
					_UpperCamelCase			     =     [0] * len(__snake_case						)

					for i in range(1  ,     len(__snake_case						)						):
										# use last results for better performance - dynamic programming
										_UpperCamelCase			     =     prefix_result[i - 1]
										while j > 0 and input_string[i] != input_string[j]:
															_UpperCamelCase			     =     prefix_result[j - 1]

										if input_string[i] == input_string[j]:
															j += 1
										_UpperCamelCase			     =     j

					return prefix_result
def 					_snake_case	(  __snake_case						):
					return max(prefix_function(__snake_case						)						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()


'''simple docstring'''

from cva import destroyAllWindows, imread, imshow, waitKey


def        UpperCAmelCase_ (  lowerCamelCase_			):







 """simple docstring"""


 lowerCAmelCase__		,     lowerCAmelCase__     :   Tuple     		=	img.shape[0], img.shape[1]

 # converting each pixel's color to its negative
 for i in range(lowerCamelCase_			):
  for j in range(lowerCamelCase_			):
   lowerCAmelCase__     :   Optional[int]     		=	[2_5_5, 2_5_5, 2_5_5] - img[i][j]

 return img


if __name__ == "__main__":
     # read original image
     snake_case									=    imread("""image_data/lena.jpg""", 1)

     # convert to its negative
     snake_case									=    convert_to_negative(img)

     # show result image
     imshow("""negative of original image""", img)
     waitKey(0)
     destroyAllWindows()





