Parity of Tuples
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

Bobo has n m-tuple , where . He wants to find which is the number of v_i where has odd number of ones in its binary notation for all j. Note that denotes the bitwise-and.

Print for given k, where denotes bitwise-xor.

输入描述:

The input consists of several test cases and is terminated by end-of-file.

The first line of each test case contains three integers n, m and k.
The ith of the following n lines contains m integers .

*
*
*
* .
* There is exactly one test case with , m = 10 and k = 20. The other 300 test cases have , and .

输出描述:

For each test case, print an integer which denotes the result.
示例1

输入

复制
1 2 2
3 3
1 2 2
1 3
3 3 4
1 2 3
4 5 6
7 8 9

输出

复制
10
3
1102106