0%

Problem 760


Problem 760


Sum over Bitwise Operators

Define
g(m,n)=(mn)+(mn)+(mn)
where ,, are the bitwise XOR, OR and AND operator respectively.

Also set
G(N)=n=0Nk=0ng(k,nk)

For example, G(10)=754 and G(102)=583766.

Find G(1018). Give your answer modulo 1 000 000 007.


位运算求和


g(m,n)=(mn)+(mn)+(mn)
其中,,分别代表“按位异或”、“按位或”和“按位与”运算。

再记
G(N)=n=0Nk=0ng(k,nk)

例如,G(10)=754G(102)=583766

G(1018),并将你的答案对1 000 000 007取余。


Gitalking ...