Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2012 Question 82

Math Olympiad Vault · MathNet 2012

Question 82

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,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?