#P3226. [HNOI2012] 集合选数
[HNOI2012] 集合选数
Description
The course "Set Theory and Graph Theory" has a homework problem asking students to find all subsets of that satisfy the following condition: if is in the subset, then and cannot be in the subset.
Students do not like such enumeration-style problems, so they turned it into the following question: for any positive integer , how many subsets of satisfy the above constraint (you only need to output the result modulo ). Now this task is handed to you.
Input Format
A single line containing a positive integer .
Output Format
Output a single positive integer, the number of subsets of that satisfy the above constraint.
4
8
Hint
Sample explanation:
There are sets that meet the requirement, namely , , , , , , , and .
Constraints:
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号