Rectangle Box
CodeChefOpen on judge ↗
On the occasion of K3 foundation's day, Chef received a game as a gift from K3 team containing $N$ rectangular boxes. The task of the game is to make the heights of these boxes in non-increasing order without changing the given order of boxes provided you can rotate these boxes clockwise, i.e. width will become height and vice versa. Note: You can rotate any number of boxes or no boxes at all and
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