Bit Manipulation

I came across this question and I am very curious about its solution . Suppose we have 4 numbers A,B,C,K , where A,B,C are represented in binary and K is the number of bits we can manipulate in A and B . Perform a bit manipulation on A and B such that A'(A after bit manipulation) and B'(B after bit manipulation) have a bit wise Or product = C .The allowable sum of bits Manipulated should be lesser than or equal to K (For example if K = 8 ,then we can change 3 bits in A and 5 bits in B so dat sum of bits manipulated be less than or equal to 8) .Is there a bit manipulation formula I can use to solve this?

链接地址: http://www.djcxy.com/p/36404.html

上一篇: 适用于iPhone / iPad / iOs的快速和精简PDF查看器

下一篇: 位操作