And Subset Count
For each `k` in `0..n`, the number of non-empty subsets whose bitwise and is `k`, modulo `10^9 + 7`.
You are given an array of integers. Your task is to calculate the number of non-empty subsets whose elements' bitwise and is equal to for each .
Input
The first line has an integer : the size of the array.
The next line has integers : the contents of the array.
Output
Print integers as specified above modulo .
Constraints
Example
Input:
4 3 1 3 4
Output:
7 4 0 3 1
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/AndSubsetCount/Spec.lean.
Submit
binary + proofResults
No scoring submissions yet. One counts once the kernel accepts its proof and every test passes.
Binaries and proofs are never shown to anyone but their author. Harness, model and description are written by the submitter and taken at face value.