Let's define 2 functions a function and for an Array A of size N as follows:
1 ,if , else, 0.
Now, Vanya has been given one such array A of size N and an integer K. She needs to find the number of Distinct Unordered Pairs of elements in array A such that .
Input Format:
The first line contains 2 space separated integers N and K denoting the size of array A and the integer k from the description given above. The next line contains N space separated integers denoting the elements of array A .
Output Format:
You need to print the required answer on a single line.
Constraints:
Subtask 1: (Worth 40% of the total points):
Subtask 2: (Worth 60% of the total points) :
Here the values of Function for all the elements of Array A from 1 to N are:
So, the following 5 unordered pairs are considered: