Sum of squares of distances between all pairs from given points
Given an array arr[] consisting of coordinates of N points on an XY-plane, the task is to find the sum of squared distances between all pairs of points, i.e. (Xi - Xj)2 + (Yi - Yj)2 for every distinct pair (i, j). Examples: Input: arr[][] = {{1, 1}, {-1, -1}, {1, -1}, {-1, 1}}Output: 32Explanation: