← All problemsSign in

Pintu and Fruits

CodeChefRating 1313Open on judge ↗

Chef went to Australia and saw the destruction caused by bushfires, which made him sad, so he decided to help the animals by feeding them fruits. First, he went to purchase fruits from Pintu. Pintu sells $M$ different types of fruits (numbered $1$ through $M$). He sells them in $N$ baskets (numbered $1$ through $N$), where for each valid $i$, the $i$-th basket costs $P_i$ and it contains fruits

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