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.
My approach to solve this question was following : total number of blocks will be m*n,so if we place every pakage in the vertex shared by 4 squares,so we have to place m*n/4 pakages.But when i compiled the code it's not satisfying most of the test cases.Why is it so ?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Army Game
You are viewing a single comment's thread. Return to all comments →
My approach to solve this question was following : total number of blocks will be m*n,so if we place every pakage in the vertex shared by 4 squares,so we have to place m*n/4 pakages.But when i compiled the code it's not satisfying most of the test cases.Why is it so ?