[Solution] Lost Array Codeforces Solution
(-indexed) of length that contains information about the world and life. After that, he decided to convert it into the matrix (-indexed) of size which contains information about the world, life and beyond.
Spyofgame converted into with the following rules.
- if ;
- if ;
- if .
Here denotes the bitwise XOR operation.
Today, archaeologists have discovered the famous matrix . However, many elements of the matrix has been lost. They only know the values of for (note that these are some elements of the last column, not the last row).
occupied
The archaeologists want to know what a possible array of is. Can you help them reconstruct any array that could be ?
The first line contains a single integer ().
The second line contains integers ().
If some array is consistent with the information, print a line containing integers . If there are multiple solutions, output any.
If such an array does not exist, output instead.
No comments:
Post a Comment