Chef and his bookstore
CodeChefOpen on judge ↗
Chef is giving a offer in his new opened bookstore “anyone can take three and pay for the only two more expensive ones”. So, each customer who picks three books gets the cheapest one for free. The customer can take even more books and, depending on the way the books are arranged into groups of three, get the cheapest one in each group for free. For eg,say if the prices of the books taken by the c
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