def rig_roi(cpu_name: str, cpu_price: float, daily_mining_profit: float, minimal_rig: list, medium_rig: list, quality_rig: list) -> float:
    """
    Computes how many days have to pass to reach ROI (Return of investment), if the investment is a whole rig. Formula:
    minimal_rig_price = 187€
    medium_rig_price = 231€
    quality_rig_price = 376€
    (rig_price + cpu_price) / daily_mining_profit

    :param cpu_name: String. Official name of the CPU.
    :param cpu_price: Float. Current CPU market price.
    :param daily_mining_profit: Float. Money you gain after paying the daily mining expense.
    :param minimal_rig: List. A list of CPUs that can run efficiently using minimal rig.
    :param medium_rig: List. A list of CPUs that can run efficiently using medium rig.
    :param quality_rig: List. A list of CPUs that can run efficiently using quality rig.
    :return: Float. Days required for rig ROI.
    """
    if cpu_name in minimal_rig:
        return round((187 + cpu_price) / daily_mining_profit, 1)
    elif cpu_name in medium_rig:
        return round((231 + cpu_price) / daily_mining_profit, 1)
    elif cpu_name in quality_rig:
        return round((376 + cpu_price) / daily_mining_profit, 1)
    return 0