SPACE PRISON
CodeChefOpen on judge ↗
In the Cosmos, the dark side has made a space prison which has $K$ cells and each cell has a power $P$ that represents the area of the cell. A cell is a closed area where no one can enter or leave. You are given a matrix $A$ with $N$ rows and $M$ columns, where $A[i][j]$ is a $4$ bit binary string that represent the direction of walls. $A[i][j]$ is represented as $North, East, South, West$. For
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