JCC25 Contest 2 P6 - Diversification


Submit solution

Points: 7
Time limit: 1.0s
Memory limit: 256M

Authors:
Problem type

AY Jackson's coding club is trying to meet their diversity quota this year! Out of the \(N\) \((2 \le N \le 19)\) executives, at least \(K\) \((1 \le K \le N)\) of them must be aliens from the distant planet Xyphorion. Jason and Jimmy, the club presidents, have found you in hopes of figuring out the total possible ways the executives can be made so that the club does not get disbanded for violating equity rules. Each executive holds a different position, so you can treat the positions as all distinct. You may however treat the humans as indistinguishable, and the same can be done for the aliens.

Input specifications:

The first and only line contains \(2\) integers \(N\), \(K\).

Output specifications:

Output each group in lexicographic order (sorted by Aliens in earlier positions).

Sample Input:

3 2

Sample Output:

Group 1:
Position 1: Alien
Position 2: Alien
Position 3: Alien

Group 2:
Position 1: Alien
Position 2: Alien
Position 3: Human

Group 3:
Position 1: Alien
Position 2: Human
Position 3: Alien

Group 4:
Position 1: Human
Position 2: Alien
Position 3: Alien

Comments

There are no comments at the moment.