atcoder#ARC147D. [ARC147D] Sets Scores
[ARC147D] Sets Scores
Score : points
Problem Statement
Consider a sequence of integer sets of length : . We call a sequence brilliant if it satisfies all of the following conditions:
- is a (possibly empty) integer set, and its elements are in the range .
- The number of integers that is included in exactly one of and is .
We define the score of a brilliant sequence as the number of sets among that include ..
Find, modulo , the sum of the scores of all possible brilliant sequences.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
2 3
24
Among all possible brilliant sequences, the following have positive scores.
All of them have a score of , so the sum of them is .
12 34
786334067