Public Judge

pjudge

時間限制: 2 s 記憶體限制: 1024 MB 總分: 100

#21887. 【PR #14】Settling Down

统计

For an array $A$ and a number $X$, let us define $f(A,X)$ as follows:

If it is impossible to partition $A$ into several subsegments such that the XOR sum of all elements in each subsegment is not equal to $X$, then $f(A,X)=0$.

Otherwise, $f(A,X)$ is equal to the maximum possible number of subsegments in such a partition.

Given integers $N, K$, and $X$, where $0\leq X<2^K$. Consider an array $A$ of length $N$, where each element is an integer uniformly generated from $0$ to $2^K-1$. Find the expected value of $f(A,X)$ modulo $998244353$.

Input

The first line of input contains three integers $N, K, X$.

Output

Output one line representing the answer.

Examples

Input 1

1 3 4

Output 1

124780545

Input 2

2 2 1

Output 2

561512450

Input 3

69 42 2022

Output 3

423858008

Constraints

For $100\%$ of the data, $1 \le N \le 10^6, 1 \le K \le 60, 0 \leq X < 2^K$.

The additional constraints for each subtask are as follows:

Subtask ID $N \leq$ $K \leq$ Special Property Score
1 $10^6$ $60$ $X=0$ $10$
2 $20$ $4$ - $10$
3 $100$ $60$ - $15$
4 $2000$ $60$ - $25$
5 $10^6$ $60$ - $40$

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.