← All problemsSign in

My First Geometry Problem

CodeChefRating 1171Open on judge ↗

You are on a $2$-dimensional grid, where you start at $(0, 0)$. You are given a **binary** string $S$ of length $4$ where: - $S_1$ refers to *left* direction; - $S_2$ refers to *right* direction; - $S_3$ refers to *up* direction; - $S_4$ refers to *down* direction. $S_i = 1$ denotes that you are allowed to make a move in the respective direction and vice-versa. Find the number of cells $(x, y)

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