Hard OA Question(Meta)
Anonymous User
1344

You are provided with an array of integers having length N, All you have to do is to find the number of subsequences of length K such that for a particular subsequence Sq[i+1]-Sq[i] is constant for that complete subsequence.

Constraints-> 1<=N,k<=50, 1<=A[i]<=50
Input format->
First line contains t (Number of test cases)
then each t lines contains 2 integers N and K
following line contains N integers

Example 1->
1
5 3
1 3 8 5 13
Output->2

Example 2->
2
2 2
0 2
2 4
0 10
Output->
1
0

Comments (4)