When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

Trgt_2021_explosion's blog

By Trgt_2021_explosion, history, 4 years ago, In English

Hi everyone I was solving this problem. I tried a lot for finding a general formula for — How many permutation out of $$$n!$$$ will lead to exactly $$$K$$$ different chocolates. Then we just have to find probability by dividing with $$$n!$$$ and find Expectation by multiplying with $$$K$$$ and finally add the expectation for all such $$$K$$$ in range $$$[1,N]$$$. But I am unable to find a general formula for this. Also I am not able to get the editorial basically proof of that.
Can anyone please provide some idea regarding this. It'll be of great help.

| Write comment?