Mr. Furion is a math teacher. His students are very lazy and they do not like to do their homework. One day, Mr. Furion decides to give them a special problem in order to see whether his students are talents in math or they are just too lazy to do their homework. The problem is:
Given an integer k, n integers m1,m2…mn, and a formula below:
X1 xor X2 xor X3… xor Xn = k
Please figure out that how many integral solutions of the formula can satisfy:
0<=Xi<=mi (i=1…n)
给出两个整数K,N和一个整数序列M1,M2...Mn
求满足X1 Xor X2 Xor X3...Xor Xn=k且0<=Xi<=Mi(i=1...n)的解的个数