Блог пользователя signed_integer_overflow

Автор signed_integer_overflow, история, 3 года назад, По-английски

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!

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится