Let fff denote the number of 1s in the binary representation of xxx. Now MianKing has a sequence a0...m1a_{0...m-1}a0...m1 and he wants to know the number of integer x∈[0,L]x in [0,L]x∈[0,L] satisfies that: i∈[0,m1],f(x+i)mod2=aiforall iin [0,m-1], f(x+i)~mod~2=a_ii∈[0,m1],f(x+i)mod2=ai You need to help him calculate the answer.
Let f(x)f(x)f(x) denote the number of 1s in the binary representation of xxx. Now MianKing has a sequence a0...m−1a_{0...m-1}a0...m−1 and he wants to know the number of integer x∈[0,L]x in [0,L]x∈[0,L] satisfies that: ∀i∈[0,m−1],f(x+i) mod 2=aiforall iin [0,m-1], f(x+i)~mod~2=a_i∀i∈[0,m−1],f(x+i) mod 2=ai You need to help him calculate the answer.
(图片来源网络,侵删)