← All problemsSign in

Tumbbad

Tumbbad district of Maharashtra is a weird place. It has $n$ hours in a day (n$\leq$100000). It also has a cave where $m$ Hastars live. Each Hastar comes near the opening of the cave and drops 1 gold coin the moment it reaches the cave and takes it back with him if the coin is not taken by anyone. Each Hastar reaches at hour number $i$ to the cave and leaves $after$ hour number $j$($\geq$ i) from

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