AtCoder Regular Contest 146
C
Even XOR
AtCoder
⌀ 2428
原题
← BD →
翻译中…

Problem Statement

翻译中…

How many sets $S$ consisting of non-negative integers between $0$ and $2^N-1$ (inclusive) satisfy the following condition? Print the count modulo $998244353$.

翻译中…
  • Every non-empty subset $T$ of $S$ satisfies at least one of the following:
  • The number of elements in $T$ is odd.
    • The $\mathrm{XOR}$ of the elements in $T$ is not zero.
翻译中…

What is $\mathrm{XOR}$? The bitwise $\mathrm{XOR}$ of non-negative integers $A$ and $B$, $A \oplus B$, is defined as follows: When $A \oplus B$ is written in base two, the digit in the $2^k$'s place ($k \geq 0$) is $1$ if exactly one of the digits in that place of $A$ and $B$ is $1$, and $0$ otherwise. For example, we have $3 \oplus 5 = 6$ (in base two: $011 \oplus 101 = 110$). Generally, the bitwise $\mathrm{XOR}$ of $k$ non-negative integers $p_1, p_2, p_3, \dots, p_k$ is defined as $(\dots ((p_1 \oplus p_2) \oplus p_3) \oplus \dots \oplus p_k)$. We can prove that this value does not depend on the order of $p_1, p_2, p_3, \dots, p_k$.

翻译中…

Constraints

翻译中…
  • $1 \le N \le 2 \times 10^5$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
2
Output #1
15
Sets such as $\lbrace 0,2,3 \rbrace$, $\lbrace 1 \rbrace$, and $\lbrace \rbrace$ satisfy the condition. On the other hand, $\lbrace 0,1,2,3 \rbrace$ does not. This is because the subset $\lbrace 0,1,2,3 \rbrace$ of $\lbrace 0,1,2,3 \rbrace$ has an even number of elements, whose bitwise $\mathrm{XOR}$ is $0$.
Input #2
146
Output #2
743874490
题目信息
题号
arc146_c
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。