← All problemsSign in

Dark Light

CodeChefRating 994Open on judge ↗

Tonmoy has a special torch. The torch has $4$ **levels** numbered $1$ to $4$ and $2$ **states** ($\texttt{On}$ and $\texttt{Off}$). Levels $1, 2,$ and $3$ correspond to the $\texttt{On}$ state while level $4$ corresponds to the $\texttt{Off}$ state. The **levels** of the torch can be changed as: - Level $1$ changes to level $2$. - Level $2$ changes to level $3$. - Level $3$ changes to level $4$.

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