← All problemsSign in

Grid Game

Two friends Naman and Prayank are too bored by their studies. So decided to play a game.They called their juniors too. There is a grid of dimension M * N. They will ask any junior to stand in the grid with one of his leg in one cell and another in another adjacent cell (may be horizontal or vertical only). No two juniors can have any leg in the same cell and it’s not necessary that each cell is co

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