问题 F: Counting Sequences

内存限制:256 MB 时间限制:2 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述

You are given three integers n,m,kn,m,kn,m,k, You need to calculate the number of sequence A=(A1,A2,…,An)A=(A_1,A_2,\dots,A_n)A=(A1,A2,,An) that satisfies both of the following conditions:

  • For each Ai(1≤i≤n)A_i(1\le i\le n)Ai(1in), 0≤Ai<2m0\le A_i<2^m0Ai<2m.
  • We let sequence BBB be the sequence obtained by rotating sequence AAA once,

∑i=1ncnt1(Ai⊕Bi)=k\sum_{i=1}^n cnt_1(A_i\oplus B_i)=ki=1ncnt1(AiBi)=k

Where ⊕\oplus represents bitwise XOR, one rotation operation will change (A1,A2,…,An−1,An)(A_1,A_2,\dots,A_{n-1},A_n)(A1,A2,,An1,An) to (A2,A3,…,An,A1)(A_2,A_3,\dots,A_n,A_{1})(A2,A3,,An,A1). cnt1(x)cnt_1(x)cnt1(x) represents the number of 111s in the binary representation of xxx.

输入格式

One line containing 333 integers n,m,kn,m,kn,m,k (2≤n<9982443532\le n< 9982443532n<998244353, 1≤m≤1081\le m\le 10^81m108, 1≤k≤5×1041\le k\le 5\times 10^41k5×104).

输出格式

Output one line containing an integer, representing the answer mod 998244353\text{mod}\ 998244353mod 998244353.

输入样例 复制

2 1 2

输出样例 复制

2

数据范围与提示

In the first example, AAA can be (0,1)(0, 1)(0,1) or (1,0)(1, 0)(1,0).
In the second example, AAA can be (0,1)(0, 1)(0,1), (0,2)(0, 2)(0,2), (1,0)(1, 0)(1,0), (1,3)(1, 3)(1,3), (2,0)(2, 0)(2,0), (2,3)(2, 3)(2,3), (3,1)(3, 1)(3,1), (3,2)(3, 2)(3,2).