You are given two 0-indexed integer arrays,
costandtime, of sizenrepresenting the costs and the time taken to paintndifferent walls respectively. There are two painters available:
- A paid painter that paints the
ithwall intime[i]units of time and takescost[i]units of money.- A free painter that paints any wall in
1unit of time at a cost of0. But the free painter can only be used if the paid painter is already occupied.Return the minimum amount of money required to paint the
nwalls.