#P8340. [AHOI2022] 山河重整
[AHOI2022] 山河重整
Problem Description
Ai and Lan, who live in the small universe No. , received a message from the Resetters and decided to respond to the Return Movement. They need to return most of the matter to the greater universe, leaving only a tiny amount to rebuild their civilization in the new universe.
Their civilization has a total of key pieces of information, numbered . The information they keep is a subset of these key pieces. For a piece of information numbered , as long as there exists a subset of whose sum of numbers equals , then the message bottle they designed can restore in the new universe.
Ai and Lan wonder: how many ways are there to choose the subset so that all key information can be restored? Ai and Lan naturally computed the exact number of ways in just microsecond, and now they want you to help verify it. Since the number of ways may be very large, you only need to output the result modulo .
Input Format
One line contains two positive integers .
Output Format
Output one line with one integer, which is the answer modulo .
4 1000000007
3
10 1000000007
180
1000 65472
2136
100000 100
96
Hint
Sample Explanation #1
There are in total the following sets that satisfy the condition:
Constraints
For of the testdata, it is guaranteed that , .
| Test Point ID | ||
|---|---|---|
Translated by ChatGPT 5