I am not able to understand below problem, mainly the example. I have tried to ask explanation in their website but not received help yet.
how they are calculating 36 and 43? and why 36+43 = 30$ is written?
Can I get a diagram visualizing this, because I think wood cutter should cost 12$ because only 3*4 area is needed.
Practice Problem on HackerEarth:-
Ad-optimization team is moving to their new office Safina Towers :) . But the problem is Safina towers don't have furniture, but you have wood-sheet. You are given a wood-sheet of length L . Since everyone wants to create their desk in their own style you have to give them some amount of wood. So, you are given N mark-down points (since ad-optimization team have n members) from that points you have to cut the wood sheet. But the problem is wood-cutter will cost (Xleft) + (Y right) for cutting the wood (where left and right is the size of the remaining parts of the wood after cutting). For example you want to cut a wood sheet of length 10 and X=3 and Y=4 and you want to cut at point 7 then left segment size = (7-1) =6 and right segment size = (10-7) = 3 then wood cutter will cost 36+43 = 30$ .