Cutting Boards

  • + 0 comments

    The ask is to cut the board in 1 X 1 pieces and there are horizontal and vertical markings present on the board that will help the person to cut them in 1 X 1 size of smaller boards and those markings have some cost associated with them. Now the task is to choose the sequence that cost you the minimum. Keep in mind the segments- check the Sample I/O example with explaination.

    • 1 # No. of test cases
    • 2 2 # Size of the actual board you are given, N X M
    • 2 # Cost(s) of cutting the markings on Y-axis
    • 1 # Cost(s) of cutting the markings on X-axis

    The board is 2 X 2 and you have to cut it in 1 X 1 pieces.