


"""simple docstring"""

def lowerCAmelCase_   (					UpperCamelCase__						:			list[int]					, UpperCamelCase__						:			int			):






 """simple docstring"""







 __lowercase						=						len(UpperCamelCase__			)
 __lowercase						=						[[False] * (required_sum + 1) for _ in range(arr_len + 1			)]

 # for each arr value, a sum of zero(0) can be formed by not taking any element
 # hence True/1
 for i in range(arr_len + 1			):
  __lowercase						=						True

 # sum is not zero and set is empty then false
 for i in range(1					, required_sum + 1			):
  __lowercase						=						False

 for i in range(1					, arr_len + 1			):
  for j in range(1					, required_sum + 1			):
   if arr[i - 1] > j:
    __lowercase						=						subset[i - 1][j]
   if arr[i - 1] <= j:
    __lowercase						=						subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

 return subset[arr_len][required_sum]


if __name__ == "__main__":
       import doctest

       doctest.testmod()




"""simple docstring"""

from PIL import Image


def lowerCAmelCase_   (					UpperCamelCase__						:			Image					, UpperCamelCase__						:			int			):






 """simple docstring"""







 __lowercase						=						(259 * (level + 255)) / (255 * (259 - level))

 def contrast(UpperCamelCase__						:			int			) -> int:
  return int(128 + factor * (c - 128)			)

 return img.point(UpperCamelCase__			)


if __name__ == "__main__":
       # Load image
       with Image.open("image_data/lena.jpg") as img:
              # Change contrast to 170
              UpperCAmelCase__					=change_contrast(img, 170)
              cont_img.save("image_data/lena_high_contrast.png", format="png")
