



import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
_snake_case	=						abspath(join(dirname(dirname(dirname(__file__))), "src"))
sys.path.insert(1, git_repo_path)


# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action="ignore", category=FutureWarning)






def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							from transformers.testing_utils import pytest_addoption_shared

							pytest_addoption_shared(lowerCamelCase__						)






def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							from transformers.testing_utils import pytest_terminal_summary_main

							_lowerCAmelCase  :							List[Any]				     =					terminalreporter.config.getoption("--make-reports"						)
							if make_reports:
														pytest_terminal_summary_main(lowerCamelCase__       ,				id=lowerCamelCase__						)





def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							def count_of_possible_combinations(_lowerCamelCase						) -> int:
														if target < 0:
																					return 0
														if target == 0:
																					return 1
														return sum(count_of_possible_combinations(target - item						) for item in array						)

							return count_of_possible_combinations(_lowerCamelCase						)






def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							def count_of_possible_combinations_with_dp_array(
							    _lowerCamelCase       ,				_lowerCamelCase						) -> int:
														if target < 0:
																					return 0
														if target == 0:
																					return 1
														if dp_array[target] != -1:
																					return dp_array[target]
														_lowerCAmelCase  :							Optional[int]				     =					sum(
														    count_of_possible_combinations_with_dp_array(target - item       ,				_lowerCamelCase						)
														    for item in array						)
														_lowerCAmelCase  :							Any				     =					answer
														return answer

							_lowerCAmelCase  :							List[Any]				     =					[-1] * (target + 1)
							return count_of_possible_combinations_with_dp_array(_lowerCamelCase       ,				_lowerCamelCase						)






def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							_lowerCAmelCase  :							List[Any]				     =					[0] * (target + 1)
							_lowerCAmelCase  :							List[str]				     =					1

							for i in range(1       ,				target + 1						):
														for j in range(_lowerCamelCase						):
																					if i - array[j] >= 0:
																												dp_array[i] += dp_array[i - array[j]]

							return dp_array[target]


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						_snake_case	=						3
						_snake_case	=						5
						_snake_case	=						[1, 2, 5]
						print(combination_sum_iv(n, array, target))
