#d11101. 与
与
AND Operation Arrays
Problem Description
Given and . Count how many arrays of length satisfy:
- , with .
- For every , , where denotes the bitwise AND operation.
Output the answer modulo .
Input Format
The first line contains two integers .
Output Format
One integer — the answer.
Sample Input 1
4 2
Sample Output 1
2
Sample Input 2
1919 810
Sample Output 2
501617298
Constraints
There are 10 test points in total.
- Test points 1, 2 satisfy .
- Test points 3, 4 satisfy .
- Test points 5, 6 satisfy .
For all data, .