#C4834. Minimum Tables Required
Minimum Tables Required
Minimum Tables Required
You are given a total number of guests n, the minimum number of guests allowed per table minGuests and the maximum number allowed per table maxGuests. Additionally, you are provided with a list of guest names. Your task is to determine the minimum number of tables required to seat all guests so that no table exceeds the maximum capacity. Note that to minimize the number of tables, you should aim to fill each table as close as possible to maxGuests.
The mathematical formulation is:
$$ \text{tables} = \left\lceil \frac{n}{maxGuests} \right\rceil $$
where \(n\) is the total number of guests, and \(maxGuests\) is the maximum capacity per table.
inputFormat
The input is read from stdin and consists of two lines:
- The first line contains three integers separated by spaces: n minGuests maxGuests.
- The second line contains n guest names separated by spaces.
outputFormat
Output a single integer to stdout denoting the minimum number of tables required to seat all the guests.
## sample10 2 5
Alice Bob Charlie David Eve Frank Grace Heidi Ivan Judy
2
</p>