USACO Guide Problem Submission |
---|
Finished |
You are given $$$N$$$ $$$(3 \leq N \leq 5000)$$$ integer points on the coordinate plane. Find the square of the maximum Euclidean distance (aka length of the straight line) between any two of the points.
The first line contains an integer $$$N$$$. The second line contains $$$N$$$ integers, the $$$x$$$-coordinates of the points: $$$x_1, x_2, \dots, x_N$$$ ($$$-1000 \leq x_i \leq 1000$$$). The third line contains $$$N$$$ integers, the $$$y$$$-coordinates of the points: $$$y_1, y_2, \dots, y_N$$$ ($$$-1000 \leq y_i \leq 1000$$$).
Print one integer, the square of the maximum Euclidean distance between any two of the points.
3 321 -15 -525 404 373 990
1059112
Name |
---|