What was this ?

Please someone post the solution for color tree

@sam5125 Your solution will fail this case: 4 5 10 5 5. You missed the case where every piece can be parallel to one side of the rectangle.

Can u explain the else part of your code .? How did u prove that positive solution to the equaiton exists