Phineas and Marks
Phineas goes to school after the lockdown is over and finds out that all his $N-1$ friends have turned into bullies. So he himself too starts disliking his friends. The teacher Dr Doof wants to distribute $M$ marks to his $N$ students (including Phineas). Dr Doof is busy in his experiments and so wants the students to distribute $M$ marks among themselves such that each student gets a non negativ
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