← All problemsSign in

Buying Seedlings

CodeChefRating 3018Open on judge ↗

Recently, Sergey bought a plot of S square units and now wants to build a cherry tree farm at this plot. In order to do so, he wants to visit the market and buy a number of cherry tree seedlings. There are N kinds of seedlings available in the market. One seedling of the ith kind will occupy Ai square units of Sergey's farm, will bring Sergey Ci burles of profit, and costs Bi burles each. There

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