問題一覧 > 通常問題

No.2083 OR Subset

レベル : / AI推定難易度 : 2050 / 実行時間制限 : 1ケース 3.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 29
作問者 : taiga0629kyopro / テスター : 👑 hamamu ygussany
お気に入りにしたユーザー ProblemId : 8444 / 自分の提出
問題文最終更新日: 2022-09-17 23:43:05
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 361 (順位表) の他の問題:

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$

  • $1 \le N \le 5000$
  • All inputs are integers.
  • 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もしくは右上の雲マークをクリックしてアカウントを作成してください。