

"""simple docstring"""




import functools

def 						A							(  snake_case__		,					snake_case__     ):




			'''simple docstring'''


			if not isinstance(snake_case__		,					snake_case__     ) or not all(isinstance(snake_case__		,					snake_case__     ) for day in days     ):
						raise ValueError("""The parameter days should be a list of integers"""     )

			if len(snake_case__     ) != 3 or not all(isinstance(snake_case__		,					snake_case__     ) for cost in costs     ):
						raise ValueError("""The parameter costs should be a list of three integers"""     )

			if len(snake_case__     ) == 0:
						return 0

			if min(snake_case__     ) <= 0:
						raise ValueError("""All days elements should be greater than 0"""     )

			if max(snake_case__     ) >= 3_66:
						raise ValueError("""All days elements should be less than 366"""     )

			SCREAMING_SNAKE_CASE__										=   set(snake_case__     )

			@functools.cache
			def dynamic_programming(snake_case__     ) -> int:
						if index > 3_65:
									return 0

						if index not in days_set:
									return dynamic_programming(index + 1     )

						return min(
						    costs[0] + dynamic_programming(index + 1     )		,					costs[1] + dynamic_programming(index + 7     )		,					costs[2] + dynamic_programming(index + 30     )		,					)

			return dynamic_programming(1     )


if __name__ == "__main__":
						import doctest

						doctest.testmod()





"""simple docstring"""




# flake8: noqa
# Lint as: python3
A_				:      List[str]           =			[
    "VerificationMode",
    "Version",
    "disable_progress_bar",
    "enable_progress_bar",
    "is_progress_bar_enabled",
    "experimental",
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental


