Discount on Dishes
CodeChefOpen on judge ↗
Chef Polo has opened up a new restaurant. He wants to make it as much popular as he can. Chef has M dishes to serve (numbered from 0 to M-1). To make his restaurant popular he wants to give discount everyday for a dish. But he has not been able to decide which dish should be discounted on a particular day. So he takes help from his friend Palin. Palin has come up with a unique algorithm He has
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