choose and add
#描述#
You are given a sequence b0,b1,...,bn-1 and a positive integer d. In each move you may choose one element of the given sequence and add d to it. What is the least number of moves required to make the given sequence increasing?
#格式#
##输入格式##
There are T test cases(2≤T≤20).
The frist line of each test case contains two integer numbers n and d (2≤n≤2000,1≤d≤10^6). The second line contains space separated sequence b0,b1,...,bn-1 (1≤bi≤10^6).
##输出格式##
Output the minimal number of moves needed to make the sequence increasing.
#样例1#
##样例输入1##
4 2
1 3 3 2
##样例输出1##
3
#限制#
1000ms
32768KB
#提示#
#来源#