struct Solution; impl Solution { pub fn minimum_size(nums: Vec, max_operations: i32) -> i32 { let mut l = 1; let mut r = *nums.iter().max().unwrap(); while l != r { let mid = l + r >> 1; eprint!("{:?} ", mid); let mut cnt = 0; for &x in nums.iter() { cnt += (x - 1) / mid; } eprintln!("{:?}", cnt); if cnt > max_operations { l = mid + 1; } else { r = mid; } } l } } fn main() { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).ok(); let nums: Vec = buf.trim().split(' ').map(|x|x.parse::().unwrap()).collect::>(); buf.clear(); std::io::stdin().read_line(&mut buf).ok(); let max_operations: i32 = buf.trim().parse::().unwrap(); println!("{}", Solution::minimum_size(nums, max_operations)); }