signed_integer_overflow's blog

By signed_integer_overflow, history, 2 months 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!!


Read more »

  • Vote: I like it
  • +3
  • Vote: I do not like it