← All problemsSign in

E - Save Water Save Life

Ram is trying to fill $N$ buckets of water numbered from $1$ to $N$. Each of these buckets $i$ ($1 \leq i \leq N$) have capacity $C_i$ and it needs to be filled with $C_i$ liters of water. He has a special water hose which has a really useful feature. At each turn, when Ram aims this hose at any bucket and presses the hose trigger, this hose will throw $X$ liters of water at that bucket which it

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