Given four integers X, Y, M and W. The task is to find the number of ways to choose X men and Y women from total M men and W women.
Input: X = 1, Y = 2, M = 1, W = 3
Way 1: Choose the only man and 1st and 2nd women.
Way 2: Choose the only man and 2nd and 3rd women.
Way 3: Choose the only man and 1st and 3rd women.
Input: X = 4, Y = 3, M = 6, W = 5
Approach: The total number of ways of choosing X men from a total of M men is MCX and the total number of ways of choosing Y women from W women is WCY. Hence, the total number of combined ways will be MCX * WCY.
Below is the implementation of the above approach:
- Ways of selecting men and women from a group to make a team
- Total ways of selecting a group of X men from N men with or without including a particular man
- Total number of ways to place X and Y at n places such that no two X are together
- Ways to form an array having integers in given range such that total sum is divisible by 2
- Number of ways to get even sum by choosing three numbers from 1 to N
- Count ways of choosing a pair with maximum difference
- Number of ways of choosing K equal substrings of any length for every query
- Total no of 1's in numbers
- Find the total Number of Digits in (N!)N
- Count total divisors of A or B in a given range
- Count total set bits in all numbers from 1 to n | Set 2
- Count total number of even sum sequences
- Count total number of digits from 1 to n
- Total numbers with no repeated digits in a range
- Total number of subsets in which the product of the elements is even
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.