Decoration Discount
Chef wants to decorate his house a bit, so he decides to buy **exactly two** flower vases. The shop he visits has $N$ flower vases, all arranged in a line. The price of the $i$-th vase is $A_i$. It's guaranteed that all $A_i$ are even. If Chef buys vase number $i$, the price of vase number $i+1$ will be halved. No other discounts are available. Find the minimum cost of buying **two differen
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