Prerequisites required for Subsequence Frequency Counting(August Long Challenge 2020)

I have tried a lot to solve the problem Subsequence Frequency Counting of August Long Challenge 2020,though couldn’t get any idea to optimise it for 100 points.Can anyone list the prerequisites required to solve this problem?I have tried to read the editorial but I saw that it contains a lot of new things for me like modulo inverse. It will be really kind of you just list the topics of which previous knowledge is required.
Thank you.

2 Likes

Combinatorics
You should know how to compute Binomial coefficients and then you are good to go.
Refer :

1 Like