Problem Statement | |||||||||||||
The digit d will appear in element i of ability if person i can perform task d. You are required to assign each of the given people to exactly one of the 6 tasks (numbered '0' through '5'). Two people cannot be assigned to the same task. Return the number of assignments possible. Two assignments differ if there is a person who is assigned a different task in each assignment. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | ability will contain between 1 and 6 elements, inclusive. | ||||||||||||
- | Each element of ability will contain between 1 and 6 characters, inclusive. | ||||||||||||
- | Each character in ability will be a digit between '0' and '5', inclusive. | ||||||||||||
- | No character will appear more than once in a single element of ability. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|