Mismatch
Time limit4sMemory limit512 MB
For each k from 1 to n, count the size-k subsequences whose bitwise AND is zero, modulo 998244353.
- Level
Hard9 of 10
- Topics
- Bit manipulation, Combinatorics, Math
- Solved
- No attempts yet
Problem
You are given an array of nonnegative integers. For each from to , find the number of subsequences of size (; ) such that their bitwise AND is equal to zero (). Since the answers can be very large, compute them modulo .
Two subsequences are considered distinct if there is an index such that the element is included in one of the subsequences but not the other.
Input
The first line contains an integer (). The second line contains integers ().
Output
Print space-separated integers , where is the answer for modulo .