signed_integer_overflow's blog

By signed_integer_overflow, history, 4 years ago, In English

D. Xor Sum

Can someone please help me in this task. I know if, u=a xor b & v=a+b then v=u+2(a&b)

But I have no clue how to proceed beyond this point. The editorial uses a DP solution but I am unable to understand the recurrence relation used. Please help!!

Thanks!

| Write comment?