Public Judge

pjudge

Time Limit: 2 s Memory Limit: 1024 MB Total points: 100
الإحصائيات

对于一个数组 $A$ 和数字 $X$,让我们定义 $f(A,X)$ 如下:

如果不能将 $A$ 拆分为几个子段使得每个子数组中所有元素的异或不等于 $X$,则 $f(A,X)=0$。

否则,$f(A,X)$ 等于这种拆分中最大可能的子段数。

给定整数 $N,K$ 和 $X$,其中 $0\leq X<2^K$。 考虑长度为 $N$ 的数组 $A$,如果每个元素都是从 $0$ 到 $2^K-1$ 均匀生成的整数。 求 $f(A,X)$ 的期望值对 $998244353$ 取模的值。

输入格式

输入的第一行包含三个整数 $N,K,X$。

输出格式

输出一行表示答案。

样例输入 1

1 3 4

样例输出 1

124780545

样例输入 2

2 2 1

样例输出 2

561512450

样例输入 3

69 42 2022

样例输出 3

423858008

数据范围

对于 $100\%$ 的数据,$1 \le N \le 10^6, 1 \le K \le 60, 0 \leq X < 2^K$。

各子任务的附加限制如下表所示:

子任务编号 $N \leq$ $K \leq$ 特殊性质 分值
1 $10^6$ $60$ $X=0$ $10$
2 $20$ $4$ - $10$
3 $100$ $60$ - $15$
4 $2000$ $60$ - $25$
5 $10^6$ $60$ - $40$
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.