← All problemsSign in

Delete For Fun

CodeChefRating 1873Open on judge ↗

You are given a circular binary string $S$ of length $N$. That is, position $1$ is adjacent to positions $2$ and $N$, and in general position $i$ is adjacent to $(i-1)$ and $(i+1)$ (with indices taken modulo $N$). You are also given a starting index $K$. You must delete all $N$ characters from the string, one at a time, following these rules: - Your score starts at $0$. - The first deletion

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