← All problemsSign in

Tom and Grid

Tom has a grid of $R$ rows and $C$ columns. The grid contains $(R*C)$ squares in it. Each square in the grid has some number of blocks $X$ on it. $(X \geq 0)$ But,Tom wants to make the no. of blocks in all the squares equal. To do that he is allowed to do the following operation. - He can remove any number of block from any square in the grid. What is the minimum number of blocks that Tom has

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start