← All problemsSign in

Crazy Row

CodeChefRating 3040Open on judge ↗

There are strings of infinite length $S_0, S_1, S_2, \ldots$ consisting of zeros and ones. The first string has the following form: $S_0 =$ ``...00000001111111...`` (the leftmost one is located at position $1$, and the rightmost zero is located at position $0$). For $i\ge 1$, the string $S_i$ is defined as follows: $S_{i,j}=S_{i-1,j-1} \oplus S_{i-1,j} \oplus S_{i-1,j+1}$ where $\oplus$ denotes

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