Notebook Distribution
CodeChefOpen on judge ↗
Chef is a very kind-hearted fellow and he wants to host a charity event and donate his notebooks to the children who attend that event. Chef has a set of $N$ distinct types of notebooks which are numbered from $1$ to $ N$ with each book containing $A_i(1<=i<=n)$ number of pages respectively. The event witnessed a group of $K$ children and now its the chef task to distribute his notebooks among t
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