CF1408I.Bitwise Magic

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

You are given a positive integer kk and an array a1,a2,,ana_1, a_2, \ldots, a_n of non-negative distinct integers not smaller than kk and not greater than 2c12^c-1 .

In each of the next kk seconds, one element is chosen randomly equiprobably out of all nn elements and decreased by 11 .

For each integer xx , 0x2c10 \leq x \leq 2^c - 1 , you need to find the probability that in the end the bitwise XOR of all elements of the array is equal to xx .

Each of these values can be represented as an irreducible fraction pq\frac{p}{q} , and you need to find the value of pq1p \cdot q^{-1} modulo 998244353998\,244\,353 .

输入格式

The first line of input contains three integers n,k,cn, k, c ( 1n(2ck)1 \leq n \leq (2^c - k) , 1k161 \leq k \leq 16 , 1c161 \leq c \leq 16 ).

The second line contains nn distinct integers a1,a2,,ana_1, a_2, \ldots, a_n ( kai2c1k \leq a_i \leq 2^c-1 ).

输出格式

Print 2c2^c integers: the probability that the bitwise XOR is equal to xx in the end for xx in {0,1,,2c1}\{0, 1, \ldots, 2^c-1\} modulo 998244353998\,244\,353 .

输入输出样例

  • 输入#1

    4 1 3
    1 2 3 4

    输出#1

    0 0 0 748683265 0 499122177 0 748683265
首页