← 返回 stripe 的题目列表Find the Cheapest Factory Combination
类型:online_judge
Given a list representing three stages of a process and their respective factory bids, output the lowest total cost for the entire process. Each stage has several factories to choose from, and each factory has its bid. Note: In the chosen combination of factories, you can only select one factory for each stage.
Input:
[[100,50,30],[100,20,10],[10,12,5]]
Output:
45
When selecting the factory bids for each stage, find the lowest price incrementally and add them. Ensure the input format is a valid non-empty list, and the bids are non-negative integers.
Example
Input
[[100, 50, 30], [100, 20, 10], [10, 12, 5]]