Painter problem doubt __

why are we not distributing the given 11 units in the given sample input into 6 and 5 . ,which will give answer : 6*5 ==30.

@chahatkumar
Sample Input:
2
2
5
1 10
Sample Output:
50

The boards are given with size :
Board 1 - Size 1
Board 2 - Size 10

Each board can only be painted by a single painter. That is , if Painter X starts painting Board 2 ( of size 10) , only X can paint on it and no other painter is allowed to help him out. So he will take the full time of 50 hrs to paint it ( as in this sample input , time taken by a single painter to paint one unit of board is 5 and this board is of size 10 , so Painter X takes 50 units of time )

While another painter , say Painter Y can finish painting Board 1 in 5 units of time.
Total time taken = 50 units

Your approach to distribute 11 into 6 and 5 is based on the thinking that half of the board can be painted by one painter and the other half by another. However it is not allowed.

I suggest you to solve the Painter Partition Problem before solving Painter Problem as Painter Problem is just a tiny modification to Painter Partition Problem.
Painter Partition Problem - https://hack.codingblocks.com/contests/c/133/716

Let me know if you need any further help regarding this problem.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.