We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cutting Boards
You are viewing a single comment's thread. Return to all 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.
The board is 2 X 2 and you have to cut it in 1 X 1 pieces.