- Category:
- Windows Develop
- Tags:
-
- File Size:
- 915kb
- Update:
- 2017-12-16
- Downloads:
- 0 Times
- Uploaded by:
- 关林
Description: description
Trainers A, B and C will pick their team members from among those numbered 1 to n. To be fair, each coach sorts team members according to their preference; you are responsible for assigning team members to them according to the following rules.
You get the data is a, b, c three arrays, said three coaches on the level of preferences of players, each array is a number from 1 to n per array, the smaller subscript coach said the more like the player ( For example, coach A prefers player a [0], followed by player a [1]). Your grouping rule is to find a coach A from the unassigned team members, and then to group B the unassigned team member's favorite team member B. Then, coach C ; Then coaches A, B ... and so on until all players have been assigned.
Now player k wants to know which coach he is assigned to. Please tell him.
To Search:
File list (Check if you may need any files):