Жишээ тэстүүд

Оролт
4 3 2
1 1 1 1
1 1 1
Гаралт
0 1 1 0
Оролт
3 1 5
1 2 3
4
Гаралт
0 1 2

Тэмдэглэл

In the first sample the encryption is performed in two steps: after the first step a = (0, 0, 0, 1) (remember that the calculations are performed modulo 2), after the second step a = (0, 1, 1, 0), and that is the answer.