Problem F. Lord Li's problem
时间限制 2000 ms
内存限制 64 MB
An antique machine with $\binom{n}{3}$ switches capable of processing integers in the range 0.. ${2^N}-1$has just been discovered. Each switch is associated to a distinct integer in 0.. ${2^N}-1$ with exactly three ones in its binary representation. By setting switches associated with number $X_0, X_1, . . . , X_{m-1}$ to on, any integer Y passing through the machine will render a result of $Y♁X_0♁X_1♁ . . . ♁X_{m-1}$ (here “♁” stands for bitwise-XOR). We are interested in the number of configurations capable of transforming integer S into T with exactly K switches set to on. Could you write a program to help us?
输入数据
输出数据
For each test case, please print a single integer, the total number of ways to transform the first integer into the second one. Since the answer could be quite large, you are only required to find the result module 19260817.
样例输入
复制
4 3
1101
1001
3 1
101
010
5 3
11010
10111
0 0
样例输出
复制
Case #1: 1
Case #2: 1
Case #3: 6
$ Mathjax font initiator $