Profits
Chef is running a lemonade stand, and each lemonade costs him Rs. $X$ to make. Chef will have $N$ total customers coming to his lemonade stand today, with the $i$-th customer willing to spend Rs. $i$ on a lemonade. So, the first customer is willing to spend Rs. $1$, the second Rs. $2$, the third Rs. $3$ and so on. For each customer, Chef can choose whether to accept and provide him with lemona
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