TETRIS
CodeChefOpen on judge ↗
Rishabh has an art object in his room with $H$ rows and $W$ columns, made up of $H×W$ blocks. Each block has a color represented by a lowercase English letter (a-z). The color of the block at the $i-th$ row and $j-th$ column is $c(i,j)$. Rishabh would like to dismantle the object, finding it a bit kitschy for his tastes. The dismantling is processed by repeating the following operation: Choose
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.
Sign in to chat with the tutor and save your progress.
Sign in to start