def naive_cut_rod_recursive(n: int, prices: list):
    '\n    Solves the rod-cutting problem via naively without using the benefit of dynamic\n    programming. The results is the same sub-problems are solved several times\n    leading to an exponential runtime\n\n    Runtime: O(2^n)\n\n    Arguments\n    -------\n    n: int, the length of the rod\n    prices: list, the prices for each piece of rod. ``p[i-i]`` is the\n    price for a rod of length ``i``\n\n    Returns\n    -------\n    The maximum revenue obtainable for a rod of length n given the list of prices\n    for each piece.\n\n    Examples\n    --------\n    >>> naive_cut_rod_recursive(4, [1, 5, 8, 9])\n    10\n    >>> naive_cut_rod_recursive(10, [1, 5, 8, 9, 10, 17, 17, 20, 24, 30])\n    30\n    '
    _enforce_args(n, prices)
    if (n == 0):
        return 0
    max_revue = float('-inf')
    for i in range(1, (n + 1)):
        max_revue = max(max_revue, (prices[(i - 1)] + naive_cut_rod_recursive((n - i), prices)))
    return max_revue
Solves the rod-cutting problem via naively without using the benefit of dynamic
programming. The results is the same sub-problems are solved several times
leading to an exponential runtime

Runtime: O(2^n)

Arguments
-------
n: int, the length of the rod
prices: list, the prices for each piece of rod. ``p[i-i]`` is the
price for a rod of length ``i``

Returns
-------
The maximum revenue obtainable for a rod of length n given the list of prices
for each piece.

Examples
--------
>>> naive_cut_rod_recursive(4, [1, 5, 8, 9])
10
>>> naive_cut_rod_recursive(10, [1, 5, 8, 9, 10, 17, 17, 20, 24, 30])
30
def naive_cut_rod_recursive(n: int, prices: list):
    '\n    Solves the rod-cutting problem via naively without using the benefit of dynamic\n    programming. The results is the same sub-problems are solved several times\n    leading to an exponential runtime\n\n    Runtime: O(2^n)\n\n    Arguments\n    -------\n    n: int, the length of the rod\n    prices: list, the prices for each piece of rod. ``p[i-i]`` is the\n    price for a rod of length ``i``\n\n    Returns\n    -------\n    The maximum revenue obtainable for a rod of length n given the list of prices\n    for each piece.\n\n    Examples\n    --------\n    >>> naive_cut_rod_recursive(4, [1, 5, 8, 9])\n    10\n    >>> naive_cut_rod_recursive(10, [1, 5, 8, 9, 10, 17, 17, 20, 24, 30])\n    30\n    '
    _enforce_args(n, prices)
    if (n == 0):
        return 0
    max_revue = float('-inf')
    for i in range(1, (n + 1)):
        max_revue = max(max_revue, (prices[(i - 1)] + naive_cut_rod_recursive((n - i), prices)))
    return max_revue