Berry Tough Distribution
CodeChefOpen on judge ↗
Smurf forest has V varieties of berries and there are Si number of berries belonging to each variety i(1 i V) collected by Smurfs. Berries belonging to a particular variety are all kept in the same box, i.e. berries of variety Si are kept in box i'th box. Smurfs consists of M family members and the berries collected by the family have to be distributed equally in terms of quantity of berries to e
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