CF1957B A BIT of a Construction

Description

Given integers $ n $ and $ k $ , construct a sequence of $ n $ non-negative (i.e. $ \geq 0 $ ) integers $ a_1, a_2, \ldots, a_n $ such that 1. $ \sum\limits_{i = 1}^n a_i = k $ 2. The number of $ 1 $ s in the binary representation of $ a_1 | a_2 | \ldots | a_n $ is maximized, where $ | $ denotes the [bitwise OR operation](https://en.wikipedia.org/wiki/Bitwise_operation#OR).

Input Format

N/A

Output Format

N/A

Explanation/Hint

In the first test case, we have to print exactly one integer, hence we can only output $ 5 $ as the answer. In the second test case, we output $ 1, 2 $ which sum up to $ 3 $ , and $ 1 | 2 = (11)_2 $ has two $ 1 $ s in its binary representation, which is the maximum we can achieve in these constraints. In the fourth test case, we output $ 3, 1, 1, 32, 2, 12 $ which sum up to $ 51 $ , and $ 3 | 1 | 1 | 32 | 2 | 12 = (101\,111)_2 $ has five $ 1 $ s in its binary representation, which is the maximum we can achieve in these constraints.