Count The Triplets
easy
Given an array of distinct integers. The task is to count all the triplets such that sum of two elements equals the third element.
Constraints
1 <= N <= 10^3 1 <= arr[i] <= 10^5
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
4
1 5 3 2
Sample Output
2