
You are given
The Hamming distance of two non-negative integers is defined as the number of positions in the binary representation of these numbers in which they differ (we add leading zeros if necessary).
Formally, for each
Input Specification
The first line contains two integers,
The second line contains
Output Specification
Output
Constraints
Subtask | Points | Constraints |
---|---|---|
1 | 20 | |
2 | 25 | |
3 | 25 | No additional constraints. |
Sample Input 1
4 4
9 12 9 11
Sample Output 1
2 3 2 3
Sample Input 2
4 4
5 7 3 9
Sample Output 2
2 3 2 3
Sample Input 3
4 4
3 4 6 10
Sample Output 3
3 3 2 3
Explanation for Sample 3
The numbers
Comments