← All problemsSign in

Dora Cake

Chef plans to create $N$ bean jam buns. To make a perfect bean jam bun, bun size should be equal to the amount of jam. He has $N$ buns with $i$-th bun having size $b_i$, and $N$ bottles of jam, $i$-th bottle having amount $d_i$. He can cut a piece from a bun, and throw the extra part away. Similarly, he can use some part of a particular jam bottle and throw the extra away. He cannot use the sam

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start