Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can we break the problem down into smaller subproblems and use DP?
Paid painters will be used for a maximum of N/2 units of time. There is no need to use paid painter for a time greater than this.