Description: The n monkeys in the zoo are numbered 1,2... N, queue up in line for the keeper to divide the peach by rule. animal
The peach rule of the park is that each monkey can get m peaches, but it must be lined up for collection. The breeder takes out one at a time,
2,... In the basket, the k peaches are collected by the monkey in the queue. When the number of peaches in the basket is k, it will be back again.
1 to begin. When the number of peaches in the basket and the number of peaches that the team's first monkey has obtained are no more than m, the team's first monkey can be taken out.
A basket of peaches. The monkey, which has a total of less than m, continues to queue at the end of the queue. The number of peaches in the basket plus the team's first monkey.
When the number of peaches that have been obtained by the children exceeds m, the first monkey in the team can only fill m, then leave the queue and the remaining peaches in the basket are left
The next monkey is for use. Each monkey was assigned to m peaches.
To Search:
- [keyword] - Computer Application Information Retriev
- [stacks] - Scheduling in a train station, a track c
File list (Check if you may need any files):