





from __future__ import annotations





def   lowerCamelCase__       (       UpperCamelCase__     :    list[int]    ,      UpperCamelCase__     :    list[int]    ,      UpperCamelCase__     :    int  )     ->	tuple[float, list[float]]:



					'''simple docstring'''




					_snake_case													=			list(range(len(UpperCamelCase__  )  )  )
					_snake_case													=			[v / w for v, w in zip(UpperCamelCase__    ,      UpperCamelCase__  )]
					index.sort(key=lambda UpperCamelCase__  : ratio[i]    ,      reverse=UpperCamelCase__  )

					_snake_case													=			0
					_snake_case													=			[0] * len(UpperCamelCase__  )
					for i in index:
										if weight[i] <= capacity:
															_snake_case													=			1
															max_value += value[i]
															capacity -= weight[i]
										else:
															_snake_case													=			capacity / weight[i]
															max_value += value[i] * capacity / weight[i]
															break

					return max_value, fractions


if __name__ == "__main__":
					import doctest

					doctest.testmod()










from cva import destroyAllWindows, imread, imshow, waitKey





def   lowerCamelCase__       (       UpperCamelCase__     :    Dict  )     ->	Optional[Any]:



					'''simple docstring'''




					_snake_case							,       _snake_case													=			img.shape[0], img.shape[1]

					# converting each pixel's color to its negative
					for i in range(UpperCamelCase__  ):
										for j in range(UpperCamelCase__  ):
															_snake_case													=			[255, 255, 255] - img[i][j]

					return img


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

					# convert to its negative
					UpperCAmelCase_ 							=       convert_to_negative(img)

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



