atcoder#ABC172E. [ABC172E] NEQ
[ABC172E] NEQ
Score : points
Problem Statement
Count the pairs of length- sequences consisting of integers between and (inclusive), and , that satisfy all of the following conditions:
- , for every such that .
- and , for every such that .
Since the count can be enormous, print it modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the count modulo .
2 2
2
and satisfy the conditions.
2 3
18
141421 356237
881613484