CF1336E1.Chiori and Doll Picking (easy version)
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
This is the easy version of the problem. The only difference between easy and hard versions is the constraint of m . You can make hacks only if both versions are solved.
Chiori loves dolls and now she is going to decorate her bedroom!
As a doll collector, Chiori has got n dolls. The i -th doll has a non-negative integer value ai ( ai<2m , m is given). Chiori wants to pick some (maybe zero) dolls for the decoration, so there are 2n different picking ways.
Let x be the bitwise-xor-sum of values of dolls Chiori picks (in case Chiori picks no dolls x=0 ). The value of this picking way is equal to the number of 1 -bits in the binary representation of x . More formally, it is also equal to the number of indices 0≤i<m , such that ⌊2ix⌋ is odd.
Tell her the number of picking ways with value i for each integer i from 0 to m . Due to the answers can be very huge, print them by modulo 998244353 .
输入格式
The first line contains two integers n and m ( 1≤n≤2⋅105 , 0≤m≤35 ) — the number of dolls and the maximum value of the picking way.
The second line contains n integers a1,a2,…,an ( 0≤ai<2m ) — the values of dolls.
输出格式
Print m+1 integers p0,p1,…,pm — pi is equal to the number of picking ways with value i by modulo 998244353 .
输入输出样例
输入#1
4 4 3 5 8 14
输出#1
2 2 6 6 0
输入#2
6 7 11 45 14 9 19 81
输出#2
1 2 11 20 15 10 5 0