GCD Discount
Chef is shopping for ingredients for his restaurant, and has with him a **single** discount coupon. There are $N$ ingredients Chef would like to buy. The $i$-th of them has a price of $A_i$, but Chef can buy it at a price of $B_i$ if he uses the discount coupon on it. The store is running a special campaign: every customer is given several entries into a raffle — in particular, a customer receiv
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