




def 	_a      (						SCREAMING_SNAKE_CASE_							:				Tuple      ,      SCREAMING_SNAKE_CASE_							:				Any     ):
					return (pointa[0] - pointa[0]) ** 2 + (pointa[1] - pointa[1]) ** 2







def 	_a      (						SCREAMING_SNAKE_CASE_							:				Dict      ,      SCREAMING_SNAKE_CASE_							:				Union[str, Any]=0     ):
					return sorted(SCREAMING_SNAKE_CASE_      ,      key=lambda SCREAMING_SNAKE_CASE_     : x[column]     )







def 	_a      (						SCREAMING_SNAKE_CASE_							:				int      ,      SCREAMING_SNAKE_CASE_							:				Union[str, Any]      ,      SCREAMING_SNAKE_CASE_							:				List[Any]=float("inf"     )     ):

					for i in range(points_counts - 1     ):
										for j in range(i + 1      ,      SCREAMING_SNAKE_CASE_     ):
															__lowerCAmelCase				   =       euclidean_distance_sqr(points[i]      ,      points[j]     )
															if current_dis < min_dis:
																				__lowerCAmelCase				   =       current_dis
					return min_dis







def 	_a      (						SCREAMING_SNAKE_CASE_							:				Optional[int]      ,      SCREAMING_SNAKE_CASE_							:				Optional[int]      ,      SCREAMING_SNAKE_CASE_							:				Optional[Any]=float("inf"     )     ):

					for i in range(min(6      ,      points_counts - 1     )      ,      SCREAMING_SNAKE_CASE_     ):
										for j in range(max(0      ,      i - 6     )      ,      SCREAMING_SNAKE_CASE_     ):
															__lowerCAmelCase				   =       euclidean_distance_sqr(points[i]      ,      points[j]     )
															if current_dis < min_dis:
																				__lowerCAmelCase				   =       current_dis
					return min_dis







def 	_a      (						SCREAMING_SNAKE_CASE_							:				Optional[Any]      ,      SCREAMING_SNAKE_CASE_							:				str      ,      SCREAMING_SNAKE_CASE_							:				Union[str, Any]     ):

					# base case
					if points_counts <= 3:
										return dis_between_closest_pair(SCREAMING_SNAKE_CASE_      ,      SCREAMING_SNAKE_CASE_     )

					# recursion
					__lowerCAmelCase				   =       points_counts // 2
					__lowerCAmelCase				   =       closest_pair_of_points_sqr(
					    SCREAMING_SNAKE_CASE_      ,      points_sorted_on_y[:mid]      ,      SCREAMING_SNAKE_CASE_     )
					__lowerCAmelCase				   =       closest_pair_of_points_sqr(
					    SCREAMING_SNAKE_CASE_      ,      points_sorted_on_y[mid:]      ,      points_counts - mid     )
					__lowerCAmelCase				   =       min(SCREAMING_SNAKE_CASE_      ,      SCREAMING_SNAKE_CASE_     )
					__lowerCAmelCase				   =       []
					for point in points_sorted_on_x:
										if abs(point[0] - points_sorted_on_x[mid][0]     ) < closest_pair_dis:
															cross_strip.append(SCREAMING_SNAKE_CASE_     )

					__lowerCAmelCase				   =       dis_between_closest_in_strip(
					    SCREAMING_SNAKE_CASE_      ,      len(SCREAMING_SNAKE_CASE_     )      ,      SCREAMING_SNAKE_CASE_     )
					return min(SCREAMING_SNAKE_CASE_      ,      SCREAMING_SNAKE_CASE_     )







def 	_a      (						SCREAMING_SNAKE_CASE_							:				List[str]      ,      SCREAMING_SNAKE_CASE_							:				int     ):
					__lowerCAmelCase				   =       column_based_sort(SCREAMING_SNAKE_CASE_      ,      column=0     )
					__lowerCAmelCase				   =       column_based_sort(SCREAMING_SNAKE_CASE_      ,      column=1     )
					return (
					    closest_pair_of_points_sqr(
					        SCREAMING_SNAKE_CASE_      ,      SCREAMING_SNAKE_CASE_      ,      SCREAMING_SNAKE_CASE_     )
					) ** 0.5


if __name__ == "__main__":
					UpperCamelCase__    			=			[(2, 3), (12, 30), (40, 50), (5, 1), (12, 10), (3, 4)]
					print("""Distance:""", closest_pair_of_points(points, len(points)))










from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels
from .squad import SquadExample, SquadFeatures, SquadVaProcessor, SquadVaProcessor, squad_convert_examples_to_features
from .utils import DataProcessor, InputExample, InputFeatures, SingleSentenceClassificationProcessor
from .xnli import xnli_output_modes, xnli_processors, xnli_tasks_num_labels




