How to find the number of subsets with a given length and XOR?

107 Views Asked by At

I have A (0<A<500000) elements (up to 10^6) in the set. I need to find in how many ways can I remove a subset, the size of which is a multiple of a given K (0<k<11) - K, 2K, 3K, etc. So that the XOR of what remains is 0.