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.
I really don't get the sample,
5 2
0 1
3 3
2 0
0 3
2 3
where it says by removing either stain of index
1, 4
2, 1 ( 1 - based )
would require the minimum area of single rectangular clothe. However, If ( 1, 4 ) is removed,
( 3, 3 ), ( 2, 0 ), ( 2, 3 ) will remain on the grids,
which costs 2 * 4 = 8 area.
And if( 2, 1 ) = ( 1, 2 ) is removed,
( 2, 0 ), ( 0, 3 ) , ( 2, 3 ) will remain,
which costs 3 * 4 = 12, where it shouldn't be.
Am I missing something? Thanks in advance.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Covering the stains
You are viewing a single comment's thread. Return to all comments →
I really don't get the sample, 5 2 0 1 3 3 2 0 0 3 2 3 where it says by removing either stain of index 1, 4 2, 1 ( 1 - based ) would require the minimum area of single rectangular clothe. However, If ( 1, 4 ) is removed, ( 3, 3 ), ( 2, 0 ), ( 2, 3 ) will remain on the grids, which costs 2 * 4 = 8 area. And if( 2, 1 ) = ( 1, 2 ) is removed, ( 2, 0 ), ( 0, 3 ) , ( 2, 3 ) will remain, which costs 3 * 4 = 12, where it shouldn't be. Am I missing something? Thanks in advance.