After all the difficulties, Psyche and Cupid are finally getting married.
No ordinary pearls can hold Cupid's love for Psyche. So he has collected the Jewelry of Gods at the top of Mount Olympus to make her a chain.
There are n beads on the chain. The i-th bead is of the type Ai.
Being pretty in appearance and generous in her heart, Psyche decides to give one consecutive part of the chain to her mother.
To meet her mother's particular taste, that part must have at least one type of bead that appears x times exactly.
Psyche wants to know the number of ways to choose a part of the chain for her mother.
Note that two parts [L1,R1] and [L2,R2] are different only if L1≠L2 or R1≠R2.
The first line of the input contains an integer T (1≤T≤15), which denotes the number of test cases.
For each test case, the first line contains two integers n,x (1≤n≤105,1≤x≤n).
The second line contains n integers, the i-th integer denotes Ai (0≤Ai≤109).
For each test case, print an integer which denotes the number of parts Psyche can choose.
1 2 1
2 3 2 2