Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- T = int(input())
- for t in range(T):
- N = int(input())
- cp = []
- for n in range(N):
- cp.append(input())
- dist = []
- for i in range(N-1):
- j = i+1
- while j < N:
- x1, y1 = map(int, cp[i].split())
- x2, y2 = map(int, cp[j].split())
- dist.append((x1-x2)**2 + (y1-y2)**2)
- j+=1
- print('Case %i: %i' %(t+1, max(dist)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement