CF1336E1.Chiori and Doll Picking (easy version)
省选/NOI-
通过率:0%
时间限制:3.00s
内存限制:512MB
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.
这是该问题的简单版本。简单版本与困难版本的唯一区别在于 m 的约束条件。只有当两个版本均被解决时,才允许进行 hack。
千织喜欢玩偶,现在她准备装饰自己的卧室!

作为一名玩偶收藏家,千织拥有 n 个玩偶。第 i 个玩偶具有一个非负整数值 ai(满足 ai<2m,其中 m 已给定)。千织打算从中选出若干个(可能为零个)玩偶用于装饰,因此共有 2n 种不同的选取方式。
令 x 表示千织所选玩偶的值的按位异或和(若未选任何玩偶,则定义 x=0)。该选取方式的价值定义为 x 的二进制表示中 1 的个数。更严格地说,它也等于满足条件 ⌊2ix⌋ 为奇数的下标 i 的个数,其中 0≤i<m。
请为每个整数 i(从 0 到 m)计算价值恰好为 i 的选取方式数目。由于答案可能非常大,请对 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.
第一行包含两个整数 n 和 m(1≤n≤2⋅105,0≤m≤35)—— 分别表示玩偶的数量以及选取方式的最大值。
第二行包含 n 个整数 a1,a2,…,an(0≤ai<2m)—— 表示各个玩偶的值。
输出格式
Print m+1 integers p0,p1,…,pm — pi is equal to the number of picking ways with value i by modulo 998244353.
输出 m+1 个整数 p0,p1,…,pm — 其中 pi 表示价值恰好为 i 的选取方案数,对 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
输入解题思路,AI测评打分。不知道怎么写?