#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int T; int main() { cin >> T; vector ans; while(T--) { int N; cin >> N; vector A(N+1); for(int i = 1; i <= N; ++i) cin >> A[i]; ll l = -1, r = 1e10; while(r-l > 1) { ll mid = l+(r-l)/2; vector B(N+1); for(int i = 1; i <= N; ++i) B[i] = A[i]+mid*i; bool f = true; for(int i = 1; i <= N-1; ++i) { if(B[i+1] <= B[i]) { f = false; break; } } if(f) r = mid; else l = mid; } ans.push_back(r); } for(auto v : ans) cout << v << endl; }