← All problemsSign in

Simultaneous Robots

CodeChefRating 2717Open on judge ↗

You are given an $N\times M$ grid $A$. Let $(i,j)$ denote the square in the $i$-th row from the top and the $j$-th column from the left. Each square is either empty or blocked, denoted by characters `'.'` and `'#'`, respectively. It is guaranteed that $(1, 1)$ and $(N, M)$ are both empty. Two robots are placed initially together at $(1,1)$. The robots move under the following constraints: -

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