Monopoly - With a twist
CodeChefOpen on judge ↗
Elizabeth has a chart of distinct projected prices for a property over the next several rounds. She must buy the property in one round and sell it in another, and she must do so at a loss. She wants to minimize her financial loss. For example, the property is valued at price = [20,15,8,2,12] over the next n = 5 rounds. She can purchase the property in any round, but she must resell the property
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