← All problemsSign in

Mark Points

CodeChefRating 1064Open on judge ↗

There are $N$ equi-spaced points numbered $1, 2, \ldots, N$. Initially, all points are unmarked. In one operation, you can choose $X$ such that $1 < X < N$, and then mark points $X - 1, X, X + 1$. (If any of them were already marked, they do not get affected) Finally, you will make a binary string $S$, where $S_i = 1$ if and only if you marked point $i$, and otherwise $S_i = 0$. --- Now, you

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