The Rock Jungle
CodeChefOpen on judge ↗
John is trapped in a jungle of rocks, which can be represented as a square matrix J of size [1..N][1..N]. He has the map of this jungle. He is currently stuck at the position J[1,1]. He desires to go the exit of the jungle, where he can find the river and save himself. This exit is at position J[N,N]. He can move one step in any three of the given directions from his current position: East, South
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