Overflowing Baskets
CodeChefOpen on judge ↗
There are n baskets each having some number of things initially. All the baskets are equivalent and so they can hold equal amount of goods. Initially, the baskets are at rest. Now they need to be carried. But while carrying, if the number of goods in any basket exceeds a certain number k, it overflows and falls when carrying(But it can be stable initially). Since we have lots to carry, we need to
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.
Sign in to chat with the tutor and save your progress.
Sign in to start