for _ in range(int(input())): N = int(input()) A = [-1] + list(map(int,input().split())) OK = 10**18 NG = -1 while OK - NG >= 2: MID = (OK+NG)//2 X = [A[i]+i*MID for i in range(1,N+1)] flag = True for i in range(N-1): if X[i] >= X[i+1]: flag = False if flag: OK = MID else: NG = MID print(OK)