from typing import List


def solve_naive(heights: List[int]) -> int:
    """
    naive solution
    Time: O(n^2)
    """
    max_vol = 0
    for i, start in enumerate(heights):
        for j, end in enumerate(heights[i + 1 :], i + 1):
            max_vol = max(min(start, end) * (j - i), max_vol)
    return max_vol