Problem H. Lanterns
时间限制 1000 ms
内存限制 64 MB
Alice has received a beautiful present from Bob. The present contains n lanterns and m switches. Each switch controls some lanterns and pushing the switch will change the state of all lanterns it controls from off to on or from on to off. A lantern may be controlled by many switches. At the beginning, all the lanterns are off.
Alice wants to change the state of the lanterns to some specific configurations and she knows that pushing a switch more than once is pointless. Help Alice to find out the number of ways she can achieve the goal. Two ways are different if and only if the sets (including the empty set) of the switches been pushed are different.
输入数据
输出数据
For each test case, print the case number in the first line. Then output one line containing the answer for each query.
Please follow the format of the sample output.
样例输入
复制
2
3 2
2 1 2
2 1 3
2
0 1 1
1 1 1
3 3
0
0
0
2
0 0 0
1 0 0
样例输出
复制
Case 1:
1
0
Case 2:
8
0
$ Mathjax font initiator $