
'''simple docstring'''







from manim import *


class 						__UpperCAmelCase      (					_lowerCamelCase						):


							def  lowerCamelCase				(       self  ):





								"""simple docstring"""






								_snake_case   						=		Rectangle(height=0.5    ,   width=0.5  )
								_snake_case   						=		Rectangle(height=0.46    ,   width=0.46  ).set_stroke(width=0  )

								_snake_case   						=		[mem.copy() for i in range(6  )]
								_snake_case   						=		[mem.copy() for i in range(6  )]
								_snake_case   						=		VGroup(*lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0  )
								_snake_case   						=		VGroup(*lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0  )
								_snake_case   						=		VGroup(lowerCAmelCase_    ,   lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0  )
								_snake_case   						=		Text('CPU'    ,   font_size=24  )
								_snake_case   						=		Group(lowerCAmelCase_    ,   lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0.5    ,   aligned_edge=lowerCAmelCase_  )
								cpu.move_to([-2.5, -0.5, 0]  )
								self.add(lowerCAmelCase_  )

								_snake_case   						=		[mem.copy() for i in range(4  )]
								_snake_case   						=		VGroup(*lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0  )
								_snake_case   						=		Text('GPU'    ,   font_size=24  )
								_snake_case   						=		Group(lowerCAmelCase_    ,   lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0.5    ,   aligned_edge=lowerCAmelCase_  )
								gpu.move_to([-1, -1, 0]  )
								self.add(lowerCAmelCase_  )

								_snake_case   						=		[mem.copy() for i in range(6  )]
								_snake_case   						=		VGroup(*lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0  )

								_snake_case   						=		Text('Model'    ,   font_size=24  )
								_snake_case   						=		Group(lowerCAmelCase_    ,   lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0.5    ,   aligned_edge=lowerCAmelCase_  )
								model.move_to([3, -1.0, 0]  )
								self.add(lowerCAmelCase_  )

								_snake_case   						=		[]
								for i, rect in enumerate(lowerCAmelCase_  ):
									rect.set_stroke(lowerCAmelCase_  )
									# target = fill.copy().set_fill(YELLOW, opacity=0.7)
									# target.move_to(rect)
									# self.add(target)

									_snake_case   						=		Rectangle(height=0.46 / 4    ,   width=0.46 / 3  ).set_stroke(width=0.0  ).set_fill(lowerCAmelCase_    ,   opacity=0.7  )

									if i == 0:
										cpu_target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT  )    ,   buff=0.02    ,   direction=lowerCAmelCase_  )
										cpu_target.set_x(cpu_target.get_x() + 0.1  )
									elif i == 3:
										cpu_target.next_to(cpu_targs[0]    ,   direction=lowerCAmelCase_    ,   buff=0.0  )
									else:
										cpu_target.next_to(cpu_targs[i - 1]    ,   direction=lowerCAmelCase_    ,   buff=0.0  )
									self.add(lowerCAmelCase_  )
									cpu_targs.append(lowerCAmelCase_  )

								_snake_case   						=		[mem.copy() for i in range(6  )]
								_snake_case   						=		VGroup(*lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   buff=0  )

								_snake_case   						=		Text('Loaded Checkpoint'    ,   font_size=24  )
								_snake_case   						=		Group(lowerCAmelCase_    ,   lowerCAmelCase_  ).arrange(lowerCAmelCase_    ,   aligned_edge=lowerCAmelCase_    ,   buff=0.4  )
								checkpoint.move_to([3, 0.5, 0]  )

								_snake_case   						=		Square(side_length=2.2  )
								key.move_to([-5, 2, 0]  )

								_snake_case   						=		MarkupText(
								    F'<b>Key:</b>\n\n<span fgcolor=\'{YELLOW}\'>●</span> Empty Model'    ,   font_size=18    ,   )

								key_text.move_to([-5, 2.4, 0]  )

								self.add(lowerCAmelCase_    ,   lowerCAmelCase_  )

								_snake_case   						=		MarkupText(
								    F'<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'    ,   font_size=18    ,   )

								blue_text.next_to(lowerCAmelCase_    ,   DOWN * 2.4    ,   aligned_edge=key_text.get_left()  )

								_snake_case   						=		MarkupText(
								    F'Next, a <i><span fgcolor="{BLUE}">second</span></i> model is loaded into memory,\nwith the weights of a <span fgcolor="{BLUE}">single shard</span>.'    ,   font_size=24    ,   )
								step_a.move_to([2, 2, 0]  )
								self.play(Write(lowerCAmelCase_  )    ,   Write(lowerCAmelCase_  )  )

								self.play(Write(lowerCAmelCase_    ,   run_time=1  )    ,   Create(lowerCAmelCase_    ,   run_time=1  )  )

								_snake_case   						=		[]
								_snake_case   						=		[]
								for i, rect in enumerate(lowerCAmelCase_  ):
									_snake_case   						=		fill.copy().set_fill(lowerCAmelCase_    ,   opacity=0.7  )
									target.move_to(lowerCAmelCase_  )
									first_animations.append(GrowFromCenter(lowerCAmelCase_    ,   run_time=1  )  )

									_snake_case   						=		target.copy()
									cpu_target.generate_target()
									if i < 5:
										cpu_target.target.move_to(cpu_left_col_base[i + 1]  )
									else:
										cpu_target.target.move_to(cpu_right_col_base[i - 5]  )
									second_animations.append(MoveToTarget(lowerCAmelCase_    ,   run_time=1.5  )  )

								self.play(*lowerCAmelCase_  )
								self.play(*lowerCAmelCase_  )
								self.wait()








def  _SCREAMING_SNAKE_CASE				(   a					,						a  )      ->      list[int]:
					__A	:						Optional[int]       =				int(a  )

					# Initialize Result
					__A	:						Optional[int]       =				[]

					# Traverse through all denomination
					for denomination in reversed(a  ):
										# Find denominations
										while int(a  ) >= int(a  ):
															total_value -= int(a  )
															answer.append(a  )  # Append the "answers" array

					return answer


# Driver Code
if __name__ == "__main__":
				UpperCAmelCase						:   List[str]			  =     []
				UpperCAmelCase						:   Optional[int]			  =     '''0'''

				if (
				    input('''Do you want to enter your denominations ? (yY/n): ''').strip().lower()
				    == "y"
				):
								UpperCAmelCase						:   List[Any]			  =     int(input('''Enter the number of denominations you want to add: ''').strip())

								for i in range(0, n):
												denominations.append(int(input(F"""Denomination {i}: """).strip()))
								UpperCAmelCase						:   int			  =     input('''Enter the change you want to make in Indian Currency: ''').strip()
				else:
								# All denominations of Indian Currency if user does not enter
								UpperCAmelCase						:   Optional[int]			  =     [1, 2, 5, 10, 20, 50, 1_00, 5_00, 20_00]
								UpperCAmelCase						:   Tuple			  =     input('''Enter the change you want to make: ''').strip()

				if int(value) == 0 or int(value) < 0:
								print('''The total value cannot be zero or negative.''')

				else:
								print(F"""Following is minimal change for {value}: """)
								UpperCAmelCase						:   Optional[int]			  =     find_minimum_change(denominations, value)
								# Print result
								for i in range(len(answer)):
												print(answer[i], end=''' ''')




