from math import sqrt def dis(x,y): return sqrt((x[0]-y[0])**2+(x[1]-y[1])**2) a=[] dist=[] res=0 c=input() for i in range(int(c)): x,y = input().split() a.append([float(x),float(y)]) dist.append(a.pop()) while(len(a)!=0): dd=[] for i in a: for j in dist: ...