Carry All Fruits
Chef wants to run a restaurant for $N$ days (numbered $1$ through $N$). First, Chef needs to buy some plates. Each of these plates should have a positive integer *capacity*. Chef must decide in advance the number of plates $M$ to buy as well as their capacities (not necessarily the same for each plate). A plate with capacity $c$ cannot hold more than $c$ fruits and it is called *half-full* if i
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