Write a C# program that determines the maximum number of chores that can be assigned based on childrens preferences.
You are given:
- 5 children: Rif, Mai, Ben, Kim, Ken
- 5 chores labeled 15
- Each child can do at most one chore
- Each chore can be assigned to only one child
- A child can only be assigned a chore they prefer
Preferences:
- Rif {1, 3, 4, 5}
- Mai {1}
- Ben {1, 2}
- Kim {1, 2, 5}
- Ken {2, 5}
- Find the maximum number of chores completed
- Output one valid assignment of chores to children
Leave a Reply
You must be logged in to post a comment.