← All problemsSign in

Find Your Gift

CodeChefRating 1157Open on judge ↗

Today is Chef's birthday and he is looking forward to his gift. As usual, the gift is hidden and Chef has to follow a sequence of $N$ instructions to reach it. Initially, Chef is standing in the cell $(0, 0)$ of a two-dimensional grid. The sequence of instructions is given as a string $S$. If we denote Chef's current cell by $(x, y)$, each character of $S$ corresponds to an instruction as follo

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