The Stable Marriage Problem
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 2130 | Accepted: 908 |
Description
The stable marriage problem consists of matching members of two different sets according to the member’s preferences for the other set’s members. The input for our problem consists of:
- a set M of n males;
- a set F of n females;
- for each male and female we have a list of all the members of the opposite gender in order of preference (from the most preferable to the least).
A marriage is a one-to-one mappi