




def   A		(__A  :       list			)  -> Dict:







     """simple docstring"""


     UpperCAmelCase_		=				len(SCREAMING_SNAKE_CASE_			)

     # Set the gap value to be decreased by a factor of 1.3
     # after each iteration
     UpperCAmelCase_		=				1.3

     # Continue sorting until the gap is 1
     while gap > 1:
          # Decrease the gap value
          UpperCAmelCase_		=				int(gap / shrink			)

          # Sort the elements using insertion sort
          for i in range(SCREAMING_SNAKE_CASE_  ,							len(SCREAMING_SNAKE_CASE_			)			):
               UpperCAmelCase_		=				collection[i]
               UpperCAmelCase_		=				i
               while j >= gap and collection[j - gap] > temp:
                    UpperCAmelCase_		=				collection[j - gap]
                    j -= gap
               UpperCAmelCase_		=				temp

     return collection


if __name__ == "__main__":
    import doctest

    doctest.testmod()












from __future__ import annotations

from pathlib import Path







def       _a (		SCREAMING_SNAKE_CASE_				:							tuple[int, int] , SCREAMING_SNAKE_CASE_				:							tuple[int, int]	):
					return pointa[0] * pointa[1] - pointa[1] * pointa[0]







def       _a (		SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int	):
					__lowerCAmelCase							  =			(xa, ya)
					__lowerCAmelCase							  =			(xa - xa, ya - ya)
					__lowerCAmelCase							  =			(xa - xa, ya - ya)
					__lowerCAmelCase							  =			-vector_product(SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	) / vector_product(
					    SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	)
					__lowerCAmelCase							  =			+vector_product(SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	) / vector_product(
					    SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	)

					return a > 0 and b > 0 and a + b < 1







def       _a (		SCREAMING_SNAKE_CASE_				:							str = "p102_triangles.txt"	):
					__lowerCAmelCase							  =			Path(SCREAMING_SNAKE_CASE_	).parent.joinpath(SCREAMING_SNAKE_CASE_	).read_text(encoding="utf-8"	)

					__lowerCAmelCase							  =			[]
					for line in data.strip().split("\n"	):
										triangles.append([int(SCREAMING_SNAKE_CASE_	) for number in line.split(","	)]	)

					__lowerCAmelCase							  =			0
					__lowerCAmelCase							  =			42

					for triangle in triangles:
										ret += contains_origin(*SCREAMING_SNAKE_CASE_	)

					return ret


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




