python dfs backtracking solution
```code\nclass Solution:\n    def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:\n        def dfs(cost, i):\n            
```code\nclass Solution:\n    def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:\n        def dfs(cost, i):\n            res.append(cost)\n            for j in range(i, len(toppingCosts)):\n                dfs(cost + toppingCosts[j], j + 1)\n                dfs(cost + toppingCosts[j] * 2, j + 1)\n        res = []\n        for base in baseCosts:\n            dfs(base, 0)\n        return min(res, key = lambda x: (abs(target - x), x))
[]