1. Maximizing Customer Satisfaction for Item Purchases
You have a store with n items of type i, and there are m customers in line to buy these items. Each customer will buy exactly one item of any type. Given an integer n, the size of the array quantity, and m, the number of customers, determine how to maximize customer satisfaction based on the available quantity of each item type.
2. Probability of Toy Production
A toy factory has two machines. Machine 1 has a 70% probability of producing a toy, and Machine 2 has a 30% probability. If Machine 1 produces a toy, there is a 70% chance it will be a doll. If Machine 2 produces a toy, there is a 90% chance it will be a doll. Given that a toy produced is a doll, what is the probability that it was produced by Machine 2?
3. Work Payment Distribution
If one person can complete a task in 9 days, another in 6 days, and a third in 14 days, and they are paid a total of 4400, how much does the first person earn?
4. Household Items Ownership
If 60 households have a TV, 85 have a scooter, 70 have a refrigerator, and 130 households have exactly one of these items, how many households are there in total?
5. Probability of Shared Birthdays
What is the probability that, in a group of 400 people, at least two people share the same birthday?