




def 		_A(       UpperCamelCase__							:			List[Any]				,       UpperCamelCase__							:			Union[str, Any]				)    -> bool:
       '''simple docstring'''


       __lowercase      =    len(__SCREAMING_SNAKE_CASE				)
       __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()












import os







def 		_A(       UpperCamelCase__							:			str = "matrix.txt"				)    -> int:
							'''simple docstring'''


							with open(os.path.join(os.path.dirname(UpperCamelCase__				)				,       UpperCamelCase__				)				) as in_file:
														__lowercase      =    in_file.read()

							__lowercase      =    [[int(UpperCamelCase__				) for cell in row.split(''','''				)] for row in data.strip().splitlines()]
							__lowercase      =    [[0 for cell in row] for row in grid]
							__lowercase      =    len(grid[0]				)

							__lowercase      =    [[0 for i in range(UpperCamelCase__				)] for j in range(UpperCamelCase__				)]
							__lowercase      =    grid[0][0]
							for i in range(1				,       UpperCamelCase__				):
														__lowercase      =    grid[0][i] + dp[0][i - 1]
							for i in range(1				,       UpperCamelCase__				):
														__lowercase      =    grid[i][0] + dp[i - 1][0]

							for i in range(1				,       UpperCamelCase__				):
														for j in range(1				,       UpperCamelCase__				):
																					__lowercase      =    grid[i][j] + min(dp[i - 1][j]				,       dp[i][j - 1]				)

							return dp[-1][-1]


if __name__ == "__main__":
			print(F"""{solution() = }""")






