olymmath

HMMT 2012 S4

  • Team 2
  • Answer

A restaurant has some number of seats, arranged in a line. Its customers are in parties arranged in a queue. To seat its customers, the restaurant takes the next party in the queue and attempts to seat all of the party's member(s) in a contiguous block of unoccupied seats. If one or more such blocks exist, then the restaurant places the party in an arbitrarily selected block; otherwise, the party leaves.

Suppose the queue has parties of sizes 6,4,2,5,3,16,4,2,5,3,1 from front to back, and all seats are initially empty. What is the minimal number of seats the restaurant needs to guarantee that it will seat all of these customers?

Dataset text NuminaMath olympiads. Quoted with source.

Show the answer

29

Solutions

No solution is on olymmath yet. Official and human solutions come first when they arrive. AI solutions come after them, with a label.

Add a solution

Locator hmmt/2012/s4 · Tag 86A2HHE31Z · Edit this page on GitHub · Keys: j next, k previous