cswork / OA打开练习工作台

XperiOA #1

Count Integer Sequences

估计困难可在线判题

考点(AI 标注)位运算动规入门

Count the integer sequences of length N where each element can be 0..M and the bitwise XOR of all elements equals X. Output the answer modulo 998244353. Choices at different indices make different sequences.

输入格式

Input N M X; this site adds 1≤N≤100, 0≤M≤50, 0≤X≤63.

输出格式

Output the number of sequences modulo 998244353.

样例 1

输入:

1 2 0

输出:

1

样例 2

输入:

2 1 1

输出:

2

样例 3

输入:

3 4 6

输出:

12