const INF: u128 = 1u128 << 60; fn main() { let mut t = String::new(); std::io::stdin().read_line(&mut t).ok(); let t: usize = t.trim().parse().unwrap(); for _ in 0..t { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let mut lower = 0u128; let mut upper = INF; while upper > lower { let middle = (upper + lower) / 2; let next_a = (0..n).map(|i| a[i] + (i as u128 + 1) * middle).collect::>(); if next_a.windows(2).all(|lr| lr[0] < lr[1]) { upper = middle; } else { lower = middle + 1; } } println!("{}", upper); } }