#abc278h. Ex - make 1

Ex - make 1

Score : 600600 points

问题描述

一个由非负整数组成的序列 SS 被称为好序列,如果满足以下条件:

  • 存在一个非空(不一定连续)的子序列 TT,使得 TT 中所有元素按位异或的结果为 11

给定一个空序列 AA2B2^B 张卡片,每张卡片上分别写有从 002B12^B-1 的一个整数。
你需要重复执行以下操作,直到 AA 变成一个好序列:

  • 自由选择一张卡片,并将其上所写的整数追加到 AA 的末尾。然后吃掉这张卡片。(一旦被吃掉,卡片就不能再被选择了。)

在经过这些操作后,最终长度为 NN 的序列 AA 有多少种可能?请计算结果对 998244353998244353 取模后的数量。

什么是按位异或(bitwise XOR)?两个非负整数 AABB 的按位 XOR\mathrm{XOR} 运算,记作 ABA \oplus B,定义如下:

  • ABA \oplus B 表示为二进制时,第 kk 位最低位(k0k \geq 0)为 11 当且仅当 AABB 的第 kk 位最低位中恰好有一个是 11,否则为 00

例如:35=63 \oplus 5 = 6(以二进制表示:011101=110011 \oplus 101 = 110)。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

A sequence SS of non-negative integers is said to be a good sequence if:

  • there exists a non-empty (not necessarily contiguous) subsequence TT of SS such that the bitwise XOR of all elements in TT is 11.

There are an empty sequence AA, and 2B2^B cards with each of the integers between 00 and 2B12^B-1 written on them.
You repeat the following operation until AA becomes a good sequence:

  • You freely choose a card and append the integer written on it to the tail of AA. Then, you eat the card. (Once eaten, the card cannot be chosen anymore.)

How many sequences of length NN can be the final AA after the operations? Find the count modulo 998244353998244353.

What is bitwise XOR? The bitwise XOR\mathrm{XOR} of non-negative integers AA and BB, ABA \oplus B, is defined as follows.

  • When ABA \oplus B is written in binary, the kk-th lowest bit (k0k \geq 0) is 11 if exactly one of the kk-th lowest bits of AA and BB is 11, and 00 otherwise.

For instance, 35=63 \oplus 5 = 6 (in binary: 011101=110011 \oplus 101 = 110).

Constraints

  • 1N2×1051 \leq N \leq 2 \times 10^5
  • 1B1071 \leq B \leq 10^7
  • N2BN \leq 2^B
  • NN and BB are integers.

Input

The input is given from Standard Input in the following format:

NN BB

Output

Print the answer.

Sample Input 1

2 2

Sample Output 1

5

The following five sequences of length 22 can be the final AA after the operations.

  • (0,1)(0, 1)
  • (2,1)(2, 1)
  • (2,3)(2, 3)
  • (3,1)(3, 1)
  • (3,2)(3, 2)

Sample Input 2

2022 1119

Sample Output 2

293184537

Sample Input 3

200000 10000000

Sample Output 3

383948354

update @ 2024/3/10 11:43:45