fn max_water(nums: &[i32]) -> i32 {
    // your move
}