You are given two integer arrays cost and time of equal length n, which represent the cost and duration needed to paint n distinct walls.
There are two painters available:
A paid painter who paints the time[i] units of time for cost[i] units of money.
A free painter who can paint any wall in
Return the minimum total cost required to paint all n walls.
Constraints:
cost.length
cost.length time.length
cost[i]
time[i]
You are given two integer arrays cost and time of equal length n, which represent the cost and duration needed to paint n distinct walls.
There are two painters available:
A paid painter who paints the time[i] units of time for cost[i] units of money.
A free painter who can paint any wall in
Return the minimum total cost required to paint all n walls.
Constraints:
cost.length
cost.length time.length
cost[i]
time[i]