




from __future__ import annotations







def       _a (		SCREAMING_SNAKE_CASE_				:							list[int | float] , SCREAMING_SNAKE_CASE_				:							int , SCREAMING_SNAKE_CASE_				:							int	):
					if len(SCREAMING_SNAKE_CASE_	) == 0:
										raise ValueError("find_min() arg is an empty sequence"	)
					if (
					    left >= len(SCREAMING_SNAKE_CASE_	)
					    or left < -len(SCREAMING_SNAKE_CASE_	)
					    or right >= len(SCREAMING_SNAKE_CASE_	)
					    or right < -len(SCREAMING_SNAKE_CASE_	)
					):
										raise IndexError("list index out of range"	)
					if left == right:
										return nums[left]
					__lowerCAmelCase							  =			(left + right) >> 1  # the middle
					__lowerCAmelCase							  =			find_min(SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	)  # find min in range[left, mid]
					__lowerCAmelCase							  =			find_min(SCREAMING_SNAKE_CASE_ , mid + 1 , SCREAMING_SNAKE_CASE_	)  # find min in range[mid + 1, right]

					return left_min if left_min <= right_min else right_min


if __name__ == "__main__":
					import doctest

					doctest.testmod(verbose=True)










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() = }''')




