


import functools






def 		lowercase_(  SCREAMING_SNAKE_CASE_      ,						SCREAMING_SNAKE_CASE_	):


  '''simple docstring'''

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

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

  if len(SCREAMING_SNAKE_CASE_	) == 0:
    return 0

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

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

  lowerCamelCase :					Optional[Any]    =				set(SCREAMING_SNAKE_CASE_	)

  @functools.cache
  def dynamic_programming(SCREAMING_SNAKE_CASE_	) -> int:
    if index > 365:
      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()







from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
_snake_case             =     2_99_79_24_58

# Symbols
_snake_case      ,       _snake_case      ,       _snake_case      ,       _snake_case             =     symbols('''ct x y z''')






def 		lowercase_(  SCREAMING_SNAKE_CASE_	):


  '''simple docstring'''

  if velocity > c:
    raise ValueError("Speed must not exceed light speed 299,792,458 [m/s]!"	)
  elif velocity < 1:
    # Usually the speed should be much higher than 1 (c order of magnitude)
    raise ValueError("Speed must be greater than or equal to 1!"	)

  return velocity / c






def 		lowercase_(  SCREAMING_SNAKE_CASE_	):


  '''simple docstring'''

  return 1 / sqrt(1 - beta(SCREAMING_SNAKE_CASE_	) ** 2	)






def 		lowercase_(  SCREAMING_SNAKE_CASE_	):


  '''simple docstring'''

  return np.array(
      [
          [gamma(SCREAMING_SNAKE_CASE_	), -gamma(SCREAMING_SNAKE_CASE_	) * beta(SCREAMING_SNAKE_CASE_	), 0, 0],
          [-gamma(SCREAMING_SNAKE_CASE_	) * beta(SCREAMING_SNAKE_CASE_	), gamma(SCREAMING_SNAKE_CASE_	), 0, 0],
          [0, 0, 1, 0],
          [0, 0, 0, 1],
      ]	)






def 		lowercase_(  SCREAMING_SNAKE_CASE_      ,						SCREAMING_SNAKE_CASE_ = None	):


  '''simple docstring'''

  if event is None:
    lowerCamelCase :					Tuple    =				np.array([ct, x, y, z]	)  # Symbolic four vector
  else:
    event[0] *= c  # x0 is ct (speed of light * time)

  return transformation_matrix(SCREAMING_SNAKE_CASE_	) @ event


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   # Example of symbolic vector:
   _snake_case             =     transform(29_97_92_45)
   print('''Example of four vector: ''')
   print(f'''ct\' = {four_vector[0]}''')
   print(f'''x\' = {four_vector[1]}''')
   print(f'''y\' = {four_vector[2]}''')
   print(f'''z\' = {four_vector[3]}''')

   # Substitute symbols with numerical values
   _snake_case             =     {ct: c, x: 1, y: 1, z: 1}
   _snake_case             =     [four_vector[i].subs(sub_dict) for i in range(4)]

   print(f'''\n{numerical_vector}''')



