← All problemsSign in

Robot Detector

CodeChefRating 2307Open on judge ↗

There is a robot in the cell $(0, 0)$ of an infinite grid. One cell $(X, Y)$ contains an obstacle and all other cells are free. We only know that $1 \le X \le R$ and $1 \le Y \le C$, but not the exact location of the obstacle. You may give the robot a sequence of instructions. There are four types of instructions: - L: move one cell to the left, i.e. from a cell $(x, y)$ to $(x-1, y)$ - R: mo

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