The Deal of the Day
This problem gives us a description of a deck of cards and asks how many possible ways we can deal K cards from that deck such that the deal is strictly ascending.
It is key to see that while the total number of cards is 1000^10, the number of UNIQUE cards is only 10. As such, we know that there are only 2^10 unique sets of cards in a deal (ignoring order). This arises from the fact that a deal either includes a given number, or it doesn't. Hence, with 10 numbers, 2^10 possible sets. We can iterate over all 2^10, where the number of unique elements in the set is k and count the number of ways we could deal them.
The latter computation is simply the product of the number of cards of that type that exist. For example, if there are 10 of each card, and we are looking for the number of ways we could deal the first, second and third cards, it would be 10*10*10=1000 ways. We repeat this process for all possible sets.
Note that it does not make sense to iterate over all 10! permutations, as only ones which are strictly increasing will be valid anyway (though this would likely still be fast enough).
One should use bit masking and shifting to count through all 2^10 sets. You will also be required to use BigInteger, as the output can be huge. If you are using c++, you should use java instead.