Problem 24 · 2014 AMC 8
Hard
Logic & Word Problems
optimizationmedian-of-100
One day the Beverage Barn sold 252 cans of soda to 100 customers, and every customer bought at least one can of soda. What is the maximum possible median number of cans of soda bought per customer on that day?
Show answer
Answer: C — 3.5.
Show hints
Hint 1 of 3
The median of 100 sorted values only looks at the 50th and 51st. Everything below the 50th is dead weight you control — so spend as few cans as possible there to free up cans for the middle.
Still stuck? Show hint 2 →
Hint 2 of 3
"At least one each" means the floor is 1, so set the bottom 49 customers to 1 can. That's the cheapest legal way to clear them out of the way.
Still stuck? Show hint 3 →
Hint 3 of 3
Now push the 50th and 51st as high as the leftover cans allow, remembering every customer above the 50th must be ≥ the 50th's value.
Show solution
Approach: minimize the first 49, push the median pair as high as possible
- The median of 100 sorted counts is the average of the 50th and 51st. To maximize it, minimize everyone below: set customers 1–49 to the legal minimum of 1 can each (uses 49 cans, leaves 252 − 49 = 203 for the top 51).
- Let the 50th count be a and the 51st be b with a ≤ b. To spend the fewest cans above the median, make customers 51–100 all equal to b. Then the last 51 use a + 50b ≤ 203.
- Push b up. b = 4: need a + 200 ≤ 203 ⇒ a ≤ 3, so take a = 3 (and 3 ≤ 4 ✓). Median = (3 + 4)/2 = 3.5.
- b = 5 would need a + 250 ≤ 203 — impossible, so 3.5 is the ceiling.
- Sanity check: 49(1) + 3 + 50(4) = 49 + 3 + 200 = 252 cans — exactly the total. ✓
- Why this transfers: to maximize a median, starve the bottom half down to the minimum so the saved resource can lift the two middle values — the same "rob the cheap end to fund the position you care about" trick appears all over optimization problems.
Mark:
· log in to save