← All problemsSign in

The Magical Stone

CodeChefRating 2171Open on judge ↗

Initially, there is a magical stone of mass $2^N$ lying at the origin of the number line. For the next $N$ seconds, the following event happens: - Let us define the *decomposition* of a magical stone as follows: If there is a magical stone of mass $M > 1$ lying at coordinate $X$, then it decomposes into two magical stones, each of mass $\frac{M}{2}$ lying at the coordinates $X-1$ and $X+1$ respe

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