1. You will be given 2-D Array. Given array is pair wise distinct
2. You need to print count of all such combinations [i,j,k] where distance from i to k and i to j is same
3. Input and output is handled for you
4. It is a functional problem ,please do not modify main()
Input Format
Input is handled for you.
Output Format
output is handled for you
Constraints
1 <= No. of pairs <= 500 -10^4<=A[i]<=10^4
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
4 2 -1 0 -1 0 -1 -1 2
Output
4