No.2083 OR Subset
タグ : / 解いたユーザー数 29
作問者 :
taiga0629kyopro
/ テスター :
👑
hamamu
Problem Statement
For a subset $X=\left \lbrace X_1, X_2, \dots, X_k \right \rbrace$ of $\lbrace 1,2,3, \dots , 2^N-1 \rbrace$, define $f(X)=X_1\ \mathrm{OR}\ X_2\ \mathrm{OR} \dots \mathrm{OR}\ X_k$. If $X$ is the empty set, let $f(X)=0$.
A subset $S$ of $\lbrace 1,2,3, \dots , 2^N-1 \rbrace$ is called a good set if it satisfies the following condition.
- For any subsets $U$, $V$ of $S$, if $U \neq V$ then $f(U) \neq f(V)$.
There are $2^{2^N-1}$ subsets $S$ of $\lbrace 1,2,3, \dots , 2^N-1 \rbrace$. Find the number of good sets among them and output it modulo $998244353$.
What is $\mathrm{OR}$? (click to expand)
$\mathrm{OR}$ denotes the bitwise logical OR.
Input
$N$
Output
Output the number of good sets modulo $998244353$.
Sample
Sample 1
Input
2
Output
5
The $S$ satisfying the condition are the following 5: $ \lbrace \rbrace$, $ \lbrace 1 \rbrace$, $ \lbrace 2 \rbrace$, $ \lbrace 3 \rbrace$, $ \lbrace 1,2 \rbrace$.
Sample 2
Input
4
Output
98
Sample 3
Input
100
Output
457732232
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。